13.12.2011, 18:24
Hey, i just made a new command to show my ID card to someone else. But when i use the command it just shows it to myself instead of showing it to someone else.
Do i have to change this to something else to make it work?
pawn Код:
CMD:showid(playerid, params[])
{
new giveplayerid;
new string[128];
if(sscanf(params, "u", giveplayerid))
{
SendClientMessageEx(playerid, COLOR_WHITE, "[Server]: {FFFFFF}/showasl (playerid)");
return 1;
}
if(IsPlayerConnected(giveplayerid))
{
if (ProxDetectorS(8.0, playerid, giveplayerid))
{
format(string, sizeof(string), "> %s has given their identifcation details to %s.", GetPlayerNameEx(playerid),GetPlayerNameEx(giveplayerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
ShowASL(playerid,giveplayerid);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "> This player isn't near you.");
}
}
else
{
SendClientMessageEx(playerid, COLOR_GREY, "> Invalid player specified.");
return 1;
}
return 1;
}
pawn Код:
ShowASL(playerid,giveplayerid);