if(strcmp(cmd, \"/felhív\", true) == 0){ if(IsPlayerConnected(playerid)){ tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, \"HASZNÁLAT: /felhív [telefonszám]\"); SendClientMessage(playerid, COLOR_GRAD2, \"TIPP: Ha nem tudod az illetõ telefonszámát használd a /telefonkönyv parancsot!\"); return 1; } if(PlayerInfo[playerid][pPnumber] == 0) { SendClientMessage(playerid, COLOR_GRAD2, \"Nincs telefonod!\"); return 1; } GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), \"%s felveszi a telefont.\", sendername); SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USECELLPHONE); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); new phonenumb = strval(tmp); if(phonenumb == PlayerInfo[playerid][pPnumber]) { SendClientMessage(playerid, COLOR_GRAD2, \" You just get a busy tone...\"); return 1; } if(Mobile[playerid] != 255) { SendClientMessage(playerid, COLOR_GRAD2, \" You are already on a call...\"); return 1; } for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(PlayerInfo[pPnumber] == phonenumb && phonenumb != 0) { giveplayerid = i; Mobile[playerid] = giveplayerid; //caller connecting if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if(PhoneOnline[giveplayerid] > 0) { SendClientMessage(playerid, COLOR_GREY, \" That players Phone is Offline!\"); return 1; } if (Mobile[giveplayerid] == 255) { if(AdminDuty[giveplayerid] == 0) { format(string, sizeof(string), \"Csörög a telefonod! Hívó: %s. Felvenni a /felvesz parancsal tudod\", sendername); SendClientMessage(giveplayerid, COLOR_YELLOW, string); GetPlayerName(giveplayerid, sendername, sizeof(sendername)); RingTone[giveplayerid] = 10; format(string, sizeof(string), \"* %s csörög a telefonja.\", rag(sendername,2)); SendClientMessage(playerid, COLOR_WHITE, \"Várj míg felveszik a telefont!\"); SendClientMessage(playerid, COLOR_WHITE, \"Ha végeztél használd a /letesz parancsot.\"); ProxDetector(30.0, i, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); CellTime[playerid] = 1; Telefonal[playerid] = 1; return 1; } if(AdminDuty[giveplayerid] == 1) { SendClientMessage(playerid, COLOR_WHITE, \"Foglalt!\"); return 1; } } } } } } } SendClientMessage(playerid, COLOR_GRAD2, \" You just get a Busy tone...\");}return 1;} if(strcmp(cmd, \"/letesz\", true) == 0){ if(IsPlayerConnected(playerid)){ new caller = Mobile[playerid]; if(IsPlayerConnected(caller)) { if(caller != INVALID_PLAYER_ID) { if(caller != 255) { if(caller < 255) { SendClientMessage(caller, COLOR_WHITE, \"Letették a telefont!\"); CellTime[caller] = 0; Telefonal[caller] = 0; CellTime[playerid] = 0; Telefonal[playerid] = 0; SendClientMessage(playerid, COLOR_WHITE, \"Letetted a telefont és elraktad a zsebedbe.\"); Mobile[caller] = 255; } Mobile[playerid] = 255; CellTime[playerid] = 0; RingTone[playerid] = 0; PlayerInfo[playerid][pSpeaker] = 0; UnidentifedCall[playerid] = 0; Telefonal[playerid] = 0; } } } SendClientMessage(playerid, COLOR_GRAD2, \"Elraktad a telefont a zsebedbe.\"); SetPlayerSpecialAction(playerid, SPECIAL_ACTION_STOPUSECELLPHONE);}return 1;} Nem garantálom,hogy jó lesz,dt modból van.
if(strcmp(cmd, \"/felhív\", true) == 0){ if(IsPlayerConnected(playerid)){ tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, \"HASZNÁLAT: /felhív [telefonszám]\"); SendClientMessage(playerid, COLOR_GRAD2, \"TIPP: Ha nem tudod az illetõ telefonszámát használd a /telefonkönyv parancsot!\"); return 1; } if(PlayerInfo[playerid][pPnumber] == 0) { SendClientMessage(playerid, COLOR_GRAD2, \"Nincs telefonod!\"); return 1; } GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), \"%s felveszi a telefont.\", sendername); SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USECELLPHONE); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); new phonenumb = strval(tmp); if(phonenumb == PlayerInfo[playerid][pPnumber]) { SendClientMessage(playerid, COLOR_GRAD2, \" You just get a busy tone...\"); return 1; } if(Mobile[playerid] != 255) { SendClientMessage(playerid, COLOR_GRAD2, \" You are already on a call...\"); return 1; } for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(PlayerInfo[pPnumber] == phonenumb && phonenumb != 0) { giveplayerid = i; Mobile[playerid] = giveplayerid; //caller connecting if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if(PhoneOnline[giveplayerid] > 0) { SendClientMessage(playerid, COLOR_GREY, \" That players Phone is Offline!\"); return 1; } if (Mobile[giveplayerid] == 255) { if(AdminDuty[giveplayerid] == 0) { format(string, sizeof(string), \"Csörög a telefonod! Hívó: %s. Felvenni a /felvesz parancsal tudod\", sendername); SendClientMessage(giveplayerid, COLOR_YELLOW, string); GetPlayerName(giveplayerid, sendername, sizeof(sendername)); RingTone[giveplayerid] = 10; format(string, sizeof(string), \"* %s csörög a telefonja.\", rag(sendername,2)); SendClientMessage(playerid, COLOR_WHITE, \"Várj míg felveszik a telefont!\"); SendClientMessage(playerid, COLOR_WHITE, \"Ha végeztél használd a /letesz parancsot.\"); ProxDetector(30.0, i, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); CellTime[playerid] = 1; Telefonal[playerid] = 1; return 1; } if(AdminDuty[giveplayerid] == 1) { SendClientMessage(playerid, COLOR_WHITE, \"Foglalt!\"); return 1; } } } } } } } SendClientMessage(playerid, COLOR_GRAD2, \" You just get a Busy tone...\");}return 1;}
if(strcmp(cmd, \"/letesz\", true) == 0){ if(IsPlayerConnected(playerid)){ new caller = Mobile[playerid]; if(IsPlayerConnected(caller)) { if(caller != INVALID_PLAYER_ID) { if(caller != 255) { if(caller < 255) { SendClientMessage(caller, COLOR_WHITE, \"Letették a telefont!\"); CellTime[caller] = 0; Telefonal[caller] = 0; CellTime[playerid] = 0; Telefonal[playerid] = 0; SendClientMessage(playerid, COLOR_WHITE, \"Letetted a telefont és elraktad a zsebedbe.\"); Mobile[caller] = 255; } Mobile[playerid] = 255; CellTime[playerid] = 0; RingTone[playerid] = 0; PlayerInfo[playerid][pSpeaker] = 0; UnidentifedCall[playerid] = 0; Telefonal[playerid] = 0; } } } SendClientMessage(playerid, COLOR_GRAD2, \"Elraktad a telefont a zsebedbe.\"); SetPlayerSpecialAction(playerid, SPECIAL_ACTION_STOPUSECELLPHONE);}return 1;}