Command - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Command (
/showthread.php?tid=417104)
Command -
NathNathii - 19.02.2013
Hello.
I'm creating a new command but i get some few errors.
So would be nice if anyone could help me with this.
This command is supposed to put my color as red but when i compile it i get error and i also miss how to take the red color off to the default one like /coloroff
Код:
CMD:setcolour
if (strcmp("/setcolor", cmdtext, true, 10) == 0)
if(APlayerData[playerid][PlayerLevel] >= 2 || IsPlayerAdmin(playerid))
{
SetPlayerColor(playerid,0xFF0000AA)
return 1;
}
return 0;
}
Re: Command -
bensmart469 - 19.02.2013
PHP код:
CMD:setcolour(playerid,params[])
{
if(APlayerData[playerid][PlayerLevel] >= 2 || IsPlayerAdmin(playerid))
{
SetPlayerColor(playerid,0xFF0000AA)
return 1;
}
return 1;
}
Re: Command -
NathNathii - 19.02.2013
Tried that and got 1 error.
Код:
C:\Users\linda\Documents\Ny mappe (2)\pawno\include\PlayerCommands.inc(12) : error 001: expected token: ";", but found "return"
Re: Command -
SilverKiller - 19.02.2013
pawn Код:
CMD:setcolour(playerid,params[])
{
if(APlayerData[playerid][PlayerLevel] >= 2 || IsPlayerAdmin(playerid))
{
SetPlayerColor(playerid,0xFF0000AA);
return 1;
}
return 0;
}