C:\Users\x3990.003\Desktop\samp server\filterscripts\Untitled.pwn(32) : error 017: undefined symbol "playerid" C:\Users\x3990.003\Desktop\samp server\filterscripts\Untitled.pwn(33) : error 017: undefined symbol "playerid" C:\Users\x3990.003\Desktop\samp server\filterscripts\Untitled.pwn(39) : error 017: undefined symbol "playerid" C:\Users\x3990.003\Desktop\samp server\filterscripts\Untitled.pwn(40) : error 017: undefined symbol "playerid" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
Show us the line! line 32 33 39 and 40 and the call back under which you have put those lines
|
public OnRconCommand(cmd[]) { if(!strcmp(cmd,"/god",true)) { SendClientMessageToAll(0xDEEE20FF, "An admin has enabled his GODMODE!"); SetPlayerHealth(playerid, 9999999999999999999999); SetPlayerArmour(playerid, 9999999999999999999999.0); return 1; } if(!strcmp(cmd,"/ungod",true)) { SendClientMessageToAll(0xDEEE20FF, "An admin has disabled his GODMODE!"); SetPlayerHealth(playerid, 100); SetPlayerArmour(playerid, 0.0); } return 0; }
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/god", true))
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "you are not an admin");
SendClientMessageToAll(0xDEEE20FF, "An admin has enabled his GODMODE!");
SetPlayerHealth(playerid, 9999999999999999999999);
SetPlayerArmour(playerid, 9999999999999999999999.0);
return 1;
}
if(!strcmp(cmd,"/ungod",true))
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "you are not an admin");
SendClientMessageToAll(0xDEEE20FF, "An admin has disabled his GODMODE!");
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 0.0);
}
return 0;
}
this will not work because playerid is not there in the callback..
you ahd rather create this command using your normal command processor and then before the command check if player is admin or not using if(!IsPlayerAdmin(playerid)) |
You're wrong Raxi. don't post if you don't know what you're talking about.
Anyway. as ryder said already. there is no "playerid" parameter in this callback. |
You're wrong Raxi. don't post if you don't know what you're talking about.
Anyway. as ryder said already. there is no "playerid" parameter in this callback. |