12.05.2009, 16:14
hi i need help how to make a admin command only?
please help me ty alot...
please help me ty alot...
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
if(IsPlayerAdmin(playerid))
{
//command
}
else
{
SendClientMessage(playerid, 0xFF00FFFF, "You're not an admin, sorry");
}
}
return 0;
}
Originally Posted by Weirdosport
pawn Код:
|
}
}
return 0;
}
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
// Do something here
return 1;
}
return 0;
}
#endif
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminCommand.pwn(37) : warning 217: loose indentation
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminCommand.pwn(39) : error 010: invalid function or declaration
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminCommand.pwn(42) : error 010: invalid function or declaration
C:\Documents and Settings\Luc\Bureaublad\Pawno\filterscripts\AdminCommand.pwn(44) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
3 Errors.
return 0;
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
return 1;
return 0;