[HELP] Colors
#3

Quote:
Originally Posted by _Xerxes_
Show the whole /setstat command.
Here:
Quote:

if(strcmp(cmd, "/setstat", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /setstat [playerid/PartOfName] [statcode] [amount]");
***
***
***
***
SendClientMessage(playerid, COLOR_GRAD2, "|20 Color ");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /setstat [playerid/PartOfName] [statcode] [amount]");
***
***
***
***
SendClientMessage(playerid, COLOR_GRAD2, "|20 Color ");
return 1;
}
new stat;
stat = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /setstat [playerid/PartOfName] [statcode] [amount]");
***
***
***
***
SendClientMessage(playerid, COLOR_GRAD2, "|20 Color ");
return 1;
}
new amount;
amount = strval(tmp);
if (PlayerInfo[playerid][pAdmin] >= 4)
{
switch (stat)
{
***
case 20:
{
PlayerInfo[giveplayerid][pColor] = amount;
format(string, sizeof(string), " The Player Color Was Set To %d", amount);
}
***
default:
{
format(string, sizeof(string), " Invalid Stat Code", amount);
}

}
SendClientMessage(playerid, COLOR_GRAD1, string);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!");
}
}//not valid id
}//not connected
}
return 1;
}

The ***'s are things that i replaced becouse its unimportant right now.
Reply


Messages In This Thread
[HELP] Colors - by WThieves - 07.01.2010, 19:54
Re: [HELP] Colors - by Grim_ - 07.01.2010, 19:56
Re: [HELP] Colors - by WThieves - 07.01.2010, 20:08
Re: [HELP] Colors - by WThieves - 08.01.2010, 16:29

Forum Jump:


Users browsing this thread: 1 Guest(s)