(3
: error 017: undefined symbol "cmd"
(42) : error 017: undefined symbol "tmp"
(42) : error 017: undefined symbol "strtok"
(43) : error 017: undefined symbol "tmp"
(45) : error 017: undefined symbol "COLOR_WHITE"
(50) : error 017: undefined symbol "ReturnUser"
(62) : warning 217: loose indentation
(62) : error 037: invalid string (possibly non-terminated string)
(62) : error 017: undefined symbol "has"
(62) : error 017: undefined symbol "died"
(62) : fatal error 107: too many error messages on one line
38: if(strcmp(cmd, "/nuke", true) == 0)
42: tmp = strtok(cmdtext, idx);
43: if(!strlen(tmp))
45: i can fix
50: play = ReturnUser(tmp);
62: SendClientMessage(play, 0x800080AA, "You have died from a
mysterious explosion");
my whole code:
pawn Code:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
#if defined FILTERSCRIPT
new str[128];
new Nam[MAX_PLAYER_NAME];
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Blank Filterscript by your name here");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}
#endif
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmd, "/nuke", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /nuke [playerid/PartOfName]");
return 1;
}
new play;
new Float:slx, Float:sly, Float:slz;
play = ReturnUser(tmp);
if (IsPlayerAdmin(playerid))
{
if(IsPlayerConnected(play))
{
if(play != INVALID_PLAYER_ID)
{
GetPlayerPos(play, slx, sly, slz);
CreateExplosion(slx, sly, slz-10.0, 6, 11.0);
CreateExplosion(slx, sly, slz-10.0, 7, 11.0);
CreateExplosion(slx, sly, slz-10.0, 7, 11.0);
SendClientMessage(play, 0x800080AA, "You have died from a mysteriousexplosion");
SendClientMessageToAll(0x800080AA, "%s has died from a mysterious
Explosion",Nam);
}
}
}
else
{
SendClientMessage(playerid, 0x800080AA, " You are not a bloody Admin !");
}
}
return 1;
}
return 0;
}