Need someone's help to fix Errors in roleplay server
#3

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(cmdtextidx);
if(!
strlen(tmp))
{
SendClientMessage(playeridCOLOR_WHITE"{FF0000}Syntax: {FFFFFF} /frisk [playerid/ Username]");
return 
1;
}
giveplayerid ReturnUser(tmp);
if(
IsPlayerConnected(giveplayerid))
{
if(
giveplayerid != INVALID_PLAYER_ID)
{
if(
ProxDetectorS(8.0playeridgiveplayerid))
{
FriskOffer[giveplayerid] = playerid;
format(stsizeof(st), "** %s wants to frisk you, type '/accept frisk' to allow it",PlayerName(playerid));
SendClientMessage(giveplayeridCOLOR_LIGHTBLUEst);
format(st2sizeof(st2), "** You've offered to frisk %s",PlayerName(giveplayerid));
SendClientMessage(playeridCOLOR_LIGHTBLUEst2);
}
else
{
SendClientMessage(playeridCOLOR_GREY" That player is not near you !");
return 
1;
}
}
}
else
{
SendClientMessage(playeridCOLOR_GREY" That player is Offline !");
return 
1;
}
}
return 
1;

Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)