if(strcmp(cmd, "/rcostody",true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerToPoint(6.0, playerid, 222.9323,69.8237,1005.0391))
{
if(gTeam[playerid] == 2 || IsACop(playerid))
{
if(OnDuty[playerid] != 1 && PlayerInfo[playerid][pMember] == 1)
{
SendClientMessage(playerid, COLOR_GREY, " You are not on Duty!");
return 1;
}
if(PlayerInfo[giveplayerid][pCostody] == 0)
{
SendClientMessage(playerid, COLOR_GREY, " The selected player is not in costody!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /rcostody [playerid/PartOfName]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* You released %s from costody.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
format(string, sizeof(string), "* You have been released from costody by Officer %s.", sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTRED, string);
PlayerInfo[giveplayerid][pCostody] = 0;
SetPlayerPos(giveplayerid, 222.9323,69.8237,1005.0391);
}
}
}
}
}
return 1;
}
Originally Posted by manunited1878
I have the same problem
Mac_Taylor |
Originally Posted by Chrham_2
pawn Код:
|
Originally Posted by Don Correlli
That's why because you're using giveplayerid before ReturnUser function which is meant to find the ID of the player.
Quote:
|