19.07.2015, 21:18
I wanted to pass the order on zcmd but it gives me error ...
Command:
Код:
C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(24192) : error 017: undefined symbol "tmp" C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(24192) : error 017: undefined symbol "cmdtext" C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(24193) : error 017: undefined symbol "tmp" C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(24203) : error 017: undefined symbol "sendername" C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(24203) : error 017: undefined symbol "sendername" C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(24203) : error 029: invalid expression, assumed zero C:\Users\Jimmi\Desktop\93.119.25.182-7777\gamemodes\RunStrike.pwn(24203) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 7 Errors.
Код:
CMD:call(playerid,params[]) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "{00FF00}Folosire:{FFFFFF} /call [numar]"); return 1; } if(PlayerInfo[playerid][pPnumber] == 0) { SendClientMessage(playerid, COLOR_GRAD2, " Nu ai un telefon !"); return 1; } GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* %s scoate un telefon.", sendername); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); new phonenumb = strval(tmp); SetPlayerAttachedObject(playerid, 1, 330 , 6); SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USECELLPHONE); if(phonenumb == 911) { SendClientMessage(playerid, COLOR_WHITE, "INDICIU: Foloseste tasta T pentru a vorbi la telefon, scrie /hangup pentru a inchide."); SendClientMessage(playerid, COLOR_ALLDEPT, "URGENTE: Ce departament cautati, Politia sau Fireman/Paramedic?"); Mobile[playerid] = 911; return 1; } if(phonenumb == PlayerInfo[playerid][pPnumber]) { SendClientMessage(playerid, COLOR_GRAD2, " Numar ocupat!"); Mobile[playerid] = 255; return 1; } if(Mobile[playerid] != 255) { SendClientMessage(playerid, COLOR_GRAD2, " Deja esti intr-un apel.."); return 1; } if(PlayerInfo[playerid][pMuted] >= 1) { SendClientMessage(playerid, TEAM_CYAN_COLOR, "Nu poti vorbi, ai mute!"); return 1; } for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(PlayerInfo[i][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, " Acel jucator are telefonul inchis !"); return 1; } if (Mobile[giveplayerid] == 255) { if(IsAtPublicPhone(playerid)) TogglePlayerControllable(playerid, 0); if(PlayerInfo[playerid][pDonateRank] == 1) { format(string, sizeof(string), "Telefonul tau suna - Apelant: %s", sendername); } else format(string, sizeof(string), "Telefonul tau suna."); SendClientMessage(giveplayerid, COLOR_YELLOW, string); GetPlayerName(giveplayerid, sendername, sizeof(sendername)); RingTone[giveplayerid] = 10; format(string, sizeof(string), "* Telefonul lui %s incepe sa sune.", sendername); //SendClientMessage(playerid, COLOR_WHITE, "HINT: You now use T to talk on your cellphone, type /hangup to hang up"); ProxDetector(30.0, i, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); CellTime[playerid] = 1; return 1; } } } } } } SendClientMessage(playerid, COLOR_GRAD2, " Numar ocupat!"); SetPlayerSpecialAction(playerid,SPECIAL_ACTION_STOPUSECELLPHONE); RemovePlayerAttachedObject(playerid, 1); } return 1; }