PDA

View Full Version : Command


NathNathii
19/02/2013, 06:20 PM
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;
}

bensmart469
19/02/2013, 06:56 PM
CMD:setcolour(playerid,params[])
{
if(APlayerData[playerid][PlayerLevel] >= 2 || IsPlayerAdmin(playerid))
{
SetPlayerColor(playerid,0xFF0000AA)
return 1;
}
return 1;
}

NathNathii
19/02/2013, 07:00 PM
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"

SilverKiller
19/02/2013, 07:36 PM
CMD:setcolour(playerid,params[])
{
if(APlayerData[playerid][PlayerLevel] >= 2 || IsPlayerAdmin(playerid))
{
SetPlayerColor(playerid,0xFF0000AA);
return 1;
}
return 0;
}