13.11.2012, 14:46
Hey guys im currently doing my custom cookie system for a server script im doing but the /passcookie won't give the other person the cookie or show there name on the me info
pawn Код:
CMD:passcookie(playerid,params[])
{
new string[200],PID,Playername[MAX_PLAYER_NAME];
GetPlayerName(PID, Playername, sizeof(Playername));
if(PlayerInfo[playerid][pCookies] >=1)
{
if(sscanf(params, "s[128]", PID))
{
SendClientMessage(playerid,-1,"USAGE: /passcookie [playerid]");
}
else
{
format(string, sizeof(string), "* %s reaches into his pocket taking out a one big cookie passing it over to %s",RPName(playerid),RPName( PID ));
ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
PlayerInfo[playerid][pCookies] --;
PlayerInfo[PID][pCookies] ++;
}
}
else
{
format(string, sizeof(string), "INFO:{3BB9FF} Sorry %s, Seams like you dont have any cookies", RPName(playerid));
SendClientMessage(playerid,-1,string);
}
return 1;
}