CreateRNPCPolice Dont Spawn
#4

Hi buddy! Try this code!

Make this defines top of your script..
Код:
#if defined _ALS_OnPlayerSpawn 
    #undef OnPlayerSpawn 
#else 
    #define _ALS_OnPlayerSpawn 
#endif 
#define OnPlayerSpawn RNPC_OnPlayerSpawn 
forward RNPC_OnPlayerSpawn(playerid);
Then change your old code to this new code.
PHP код:
public OnPlayerSpawn(playerid

        if (
IsPlayerNPC(playerid)) { 
                
// Find the array index of the npc 
                
new slot = -1
                for (new 
0MAX_RNPC_POLICEi++) { 
                        if (
rpol[i][RPOL_NPCID] == playerid) { 
                                
slot i
                                break; 
                        } 
                } 
                
// If playerid is a policeman 
                
if (slot > -1) { 
                        
SetPlayerSkin(playeridrpol[slot][RPOL_SKIN]); 
                } 
        } 
       
CallLocalFunction("RNPC_OnPlayerSpawn""i"playerid); 
       return 
1;

Reply


Messages In This Thread
CreateRNPCPolice Dont Spawn - by bookknp - 18.07.2018, 22:01
Re: CreateRNPCPolice Dont Spawn - by RedRex - 18.07.2018, 22:27
Re: CreateRNPCPolice Dont Spawn - by bookknp - 18.07.2018, 22:58
Re: CreateRNPCPolice Dont Spawn - by RedRex - 18.07.2018, 23:02
Re: CreateRNPCPolice Dont Spawn - by bookknp - 18.07.2018, 23:10
Re: CreateRNPCPolice Dont Spawn - by RedRex - 18.07.2018, 23:15
Re: CreateRNPCPolice Dont Spawn - by bookknp - 21.07.2018, 04:56

Forum Jump:


Users browsing this thread: 1 Guest(s)