Restriction on player spawn request
#1

When I put a restriction on player request spawn for the FBI class I get the error message but I'm still able to spawn as FBI.
Код:
public OnPlayerRequestSpawn(playerid)
{
    if(gTeam[playerid] == FBI && GetPlayerCop(playerid, pInfo[playerid][Cop]) < 100) return SendClientMessage(playerid, COLOR_RED,"You need 100 cop skills to spawn as F.B.I ");
    return 1;
}
Код:
GetPlayerCop(playerid, score)
{
	GetPlayerScore(playerid, pInfo[playerid][Cop]);
	return 1;
}
Reply
#2

the sendclientmessage function returning with 1... you need to return with 0.

public OnPlayerRequestSpawn(playerid)
{
if(gTeam[playerid] == FBI && GetPlayerCop(playerid, pInfo[playerid][Cop]) < 100) return SendClientMessage(playerid, COLOR_RED,"You need 100 cop skills to spawn as F.B.I "), 0;
return 1;
}
Reply
#3

Thanks for that, +1 rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)