29.02.2012, 18:21
I see the problem here..
ok, so what u do is this.
put this under OnPlayerCommandText
replace your command with
please notify me if this works.
ok, so what u do is this.
put this under OnPlayerCommandText
pawn Код:
new cmd[256], idx, tmp[256];
cmd = strtok(cmdtext, idx);
tmp = strtok(cmdtext, idx);
pawn Код:
if(strcmp(cmd, "/removetoga", true) == 0)
{
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "/removetoga (playerid)");
}
togaplayerid = ReturnUser(tmp);
if(togaplayerid!= INVALID_PLAYER_ID)
{
if(PlayerInfo[togaplayerid][Toga] == 0)
{
SendClientMessage(playerid, COLOR_RED, "This administrator not have a toga.");
}
else if(PlayerInfo[togaplayerid][Toga] == 1)
{
new rtoga[128];
PlayerInfo[togaplayerid][aTog] = 0;
format(rtoga, sizeof(rtoga),"You remove %s's toga.", GetName(togaplayerid));
SendClientMessage(playerid, COLOR_LIGHTBLUE, rtoga);
}
}
return 1;
}