help class error / warnings
#8

PHP код:
public OnPlayerRequestClass(playeridclassid

    switch(
classid
    { 
        case 
.. 2Gang[playerid] = grove
        case 
.. 5Gang[playerid] = ballas
        case 
.. 8Gang[playerid] = vagos
        case 
.. 11Gang[playerid] = aztecas
        case 
12 .. 14:  
        {
           if(
GetPlayerScore(playerid) < 500
           { 
              
Gang[playerid] = cops
           } 
        }
    } 
    
SetPlayerPos(playerid,1984.4445,157.9501,55.9384); 
    
SetPlayerCameraPos(playerid,1984.4445,160.9501,55.9384); 
    
SetPlayerCameraLookAt(playerid,1984.4445,157.9501,55.9384); 
    
SetPlayerFacingAngle(playerid,0.0); 
    return 
1

PHP код:
public OnPlayerRequestSpawn(playerid)
{
    if(
Gang[playerid] = cops&&GetPlayerScore(playerid) < 500)
    {
        
SendClientMessage(playerid, -1"You cannot spawn.");
        return 
0;
    }
    return 
1;

You may want to look again at your code though, as if someone is sitting in the spawn window and you use Gang[playerid] totrack who is on a team, and you use a /gangchat or /department command, those who are sitting there could snoop without being spawned.
Reply


Messages In This Thread
help class error / warnings - by iSoaD - 14.05.2016, 22:22
Re: help class error / warnings - by Sew_Sumi - 14.05.2016, 22:43
Re: help class error / warnings - by iSoaD - 14.05.2016, 22:54
Re: help class error / warnings - by Sew_Sumi - 14.05.2016, 22:58
Re: help class error / warnings - by iSoaD - 14.05.2016, 23:02
Re: help class error / warnings - by Sew_Sumi - 14.05.2016, 23:07
Re: help class error / warnings - by iSoaD - 14.05.2016, 23:12
Re: help class error / warnings - by Sew_Sumi - 14.05.2016, 23:18
Re: help class error / warnings - by iSoaD - 14.05.2016, 23:22
Re: help class error / warnings - by Sew_Sumi - 14.05.2016, 23:44

Forum Jump:


Users browsing this thread: 2 Guest(s)