Static NPC - Help
#1

It`s possible to put guns to this NPC`s? If yes, how?
Reply
#2

NPCs take a player slot, as well as assigned a player id, so use GivePlayerWeapon, like for example:
PHP код:
public OnPlayerSpawn(playerid){

    new 
pname[MAX_PLAYER_NAME];
    
GetPlayerName(playeridpnamesizeof(pname)); // Getting the player's name.
    
    
if(!strcmp(pname"botnamehere")){ // Compare the player's name with the name you specify
    
        
GivePlayerWeapon(playerid315000); // Give the bot a M4 with 5000 ammo.
    
}
    
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)