01.12.2010, 02:42
Could sombody teach me how to make one command, do two things.
e.g, a player types /viptag to set there tag, then they do /viptag again to take it off.
This is my command, and i would like to learn how to make /viptag set the tag back to there normal name, and remove [PHD], also sets viptag[playerid] = 0; back to viptag[playerid] = 1;
Never really learnt anything like this, so if you could explain what everything does that would be much appreciated.
e.g, a player types /viptag to set there tag, then they do /viptag again to take it off.
This is my command, and i would like to learn how to make /viptag set the tag back to there normal name, and remove [PHD], also sets viptag[playerid] = 0; back to viptag[playerid] = 1;
Never really learnt anything like this, so if you could explain what everything does that would be much appreciated.
Код:
COMMAND:viptag(playerid, params[])
{
if(Pinfo[playerid][Vip_Level])
{
if(viptag[playerid] == 1)
{
new pname[24];
new string[100];
GetPlayerName(playerid,pname,24);
format(string,sizeof(string), "[PHD]%s",pname);
SetPlayerName(playerid,string);
viptag[playerid] = 0;
}
else
{
SendClientMessage(playerid,COLOR_WHITE,"You have already used this command or you need to be a donater.");
}
}
return 1;
}

