if(strcmp(cmd, "/taze", true) == 0) { if(IsPlayerConnected(playerid)) { if(IsPlayerInAnyVehicle(playerid)) { SendClientMessage(playerid, COLOR_RED, "You must step out the vehicle to use your tazer."); return 1; } new suspect = GetClosestPlayer(playerid); if(IsPlayerConnected(suspect)) { if(GetDistanceBetweenPlayers(playerid,suspect) < 5) return 1; { if(IsPlayerInAnyVehicle(suspect) { SendClientMessage(playerid, COLOR_RED, "You cant taze that person, Becouse they are in a car."); return 1; } GetPlayerName(suspect, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); new randt = random(4)+1; if(randt == 1) { format(string, sizeof(string), "* %s shoots with his/her Tazer at %s, but missed.", sendername ,giveplayer); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); } else { format(string, sizeof(string), "* %s Hit you with a Tazer! ", sendername); SendClientMessage(suspect, COLOR_RED, string); format(string, sizeof(string), "* %s Will Not Be getting up for 20 Seconds! ", giveplayer); SendClientMessage(playerid, COLOR_RED, string); format(string, sizeof(string), "* %s shoots with his/her Tazer at %s and tazed him/her.", sendername ,giveplayer); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); GameTextForPlayer(suspect, "~r~Tazed", 2500, 3); TogglePlayerControllable(suspect, 0); LoopingAnim(suspect, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0); PlayerCuffed[suspect] = 1; PlayerCuffedTime[suspect] = 20; } } else { SendClientMessage(playerid, COLOR_RED, " No one is near you to taze."); return 1; return 1; }
C:\Documents and Settings\home\Desktop\samp02Xserver.win32\gamemodes\crazymix.pwn(112) : error 017: undefined symbol "cmd" C:\Documents and Settings\home\Desktop\samp02Xserver.win32\gamemodes\crazymix.pwn(121) : error 017: undefined symbol "GetClosestPlayer" C:\Documents and Settings\home\Desktop\samp02Xserver.win32\gamemodes\crazymix.pwn(124) : error 017: undefined symbol "GetDistanceBetweenPlayers" C:\Documents and Settings\home\Desktop\samp02Xserver.win32\gamemodes\crazymix.pwn(128) : error 001: expected token: ")", but found "{" C:\Documents and Settings\home\Desktop\samp02Xserver.win32\gamemodes\crazymix.pwn(132) : error 017: undefined symbol "giveplayer" C:\Documents and Settings\home\Desktop\samp02Xserver.win32\gamemodes\crazymix.pwn(132) : error 017: undefined symbol "giveplayer" C:\Documents and Settings\home\Desktop\samp02Xserver.win32\gamemodes\crazymix.pwn(132) : error 029: invalid expression, assumed zero C:\Documents and Settings\home\Desktop\samp02Xserver.win32\gamemodes\crazymix.pwn(132) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 8 Errors.
Originally Posted by MenaceX^
Post this in the GF topic..
|
if (strcmp("/taze", cmdtext, true, 5) == 0) { if(IsPlayerConnected(playerid)) { if(IsPlayerInAnyVehicle(playerid)) { SendClientMessage(playerid, COLOR_RED, "You must step out the vehicle to use your tazer."); return 1; } new suspect = GetClosestPlayer(playerid); if(IsPlayerConnected(suspect)) { if(GetDistanceBetweenPlayers(playerid,suspect) < 5) { if(IsPlayerInAnyVehicle(suspect)) { SendClientMessage(playerid, COLOR_RED, "You cant taze that person, Becouse they are in a car."); return 1; } GetPlayerName(suspect, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); new randt = random(4)+1; if(randt == 1) { format(string, sizeof(string), "* %s shoots with his/her Tazer at %s, but missed.", sendername ,giveplayer); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); } else { format(string, sizeof(string), "* %s Hit you with a Tazer! ", sendername); SendClientMessage(suspect, COLOR_RED, string); format(string, sizeof(string), "* %s Will Not Be getting up for 20 Seconds! ", giveplayer); SendClientMessage(playerid, COLOR_RED, string); format(string, sizeof(string), "* %s shoots with his/her Tazer at %s and tazed him/her.", sendername ,giveplayer); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); GameTextForPlayer(suspect, "~r~Tazed", 2500, 3); TogglePlayerControllable(suspect, 0); LoopingAnim(suspect, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0); PlayerCuffed[suspect] = 1; PlayerCuffedTime[suspect] = 20; } } else { SendClientMessage(playerid, COLOR_RED, " No one is near you to taze."); return 1; } return 1; } } }