18.01.2011, 12:41
Please help me.. I need this /giverespect command...
But how to make it for players?
How to make it when player write /giverespect another player see it like Player nick: Gived you a respect point..
I just searched all forum and ****** and nothing..
(Sorry for my bad English)
But how to make it for players?
How to make it when player write /giverespect another player see it like Player nick: Gived you a respect point..
Код:
if(strcmp("/giverespect", cmd, true) == 0)
{
if(PlayerInfo[playerid][pAdminLevel] == 3)
{
tmp = strtok(cmdtext,idx);
if(!strlen(tmp))
{
return SendClientMessage(playerid,COLOR_LIGHTRED,"USAGE: /giverespect [id]");
}
new id = strval(tmp);
new pid = playerid;
if(!IsPlayerConnected(id))
{
return SendClientMessage(playerid,COLOR_GRAY,"Player: This player is not online!");
}
if (PlayerInfo[id][pPermissons] < 200)
{
new amsg[100];
new victimid[MAX_PLAYERS];
GetPlayerName(id, victimid, sizeof(victimid));
format(amsg,sizeof(amsg),"Player: You have given %s one respectpoint!",victimid);
SendClientMessage(pid,COLOR_LIGHTBLUE,amsg);
PlayerInfo[id][pPermissons]++;
PlayHintSoundAtPos(playerid);
return 1;
}
else SendClientMessage(pid,COLOR_GRAY,"Player: This player already haves too many respect (over 200)!");
}
else
{
SendClientMessage(playerid,COLOR_GRAY,"You don't have authorization.");
return 1;
}
}
(Sorry for my bad English)


I'm not pro just I think today it will be done by my self.. so Thanks and have a nice day