06.03.2016, 20:23
When someone frisk other it show frisker name not the person frisked.
PHP код:
if(strcmp(cmd,"/frisk",true)==0)
{
if(IsPlayerConnected(playerid))
{
new st[126], st2[126];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "{FF0000}Syntax: {FFFFFF} /frisk [playerid/ Username]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(ProxDetectorS(8.0, playerid, giveplayerid))
{
FriskOffer[giveplayerid] = playerid;
format(st, sizeof(st), "** %s wants to frisk you, type '/accept frisk' to allow it",PlayerName(playerid));
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, st);
format(st2, sizeof(st2), "** You've offered to frisk %s",PlayerName(giveplayerid));
SendClientMessage(playerid, COLOR_LIGHTBLUE, st2);
}
else
{
SendClientMessage(playerid, COLOR_GREY, " That player is not near you !");
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " That player is Offline !");
return 1;
}
}
return 1;
}