Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

Restriction on player spawn request

$
0
0
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.
Code:

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;
}

Code:

GetPlayerCop(playerid, score)
{
        GetPlayerScore(playerid, pInfo[playerid][Cop]);
        return 1;
}


Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>