Where do i put this script?
#1

Hello evryone.
I dont know where to put this script the place for it can someone help?Its a create vehicle command.
PHP код:
#define MAX_CARS (yourmax) 
enum vehData 
    
VehID
    
VehTeam 
}; 
new 
VehData[MAX_CARS][vehData]; 
enum playerData 
    
pTeam 
}; 
new 
PlayerData[MAX_PLAYERS][playerData]; 
CMD:createveh(playeridparams[]) 

    static 
    
model
    
team
    if (
sscanf(params"dd"modelteam)) 
    { 
        
SendClientMessage(playerid, -1"/createveh <model> <team>"); 
        return 
1
    } 
    return 
1

Reply
#2

PHP код:
#define MAX_CARS (yourmax)  
enum vehData {  
    
VehID,  
    
VehTeam  
};  
new 
VehData[MAX_CARS][vehData];  
enum playerData {  
    
pTeam  
};  
new 
PlayerData[MAX_PLAYERS][playerData]; 
in the top of your script ( after includes ), replace (yourmax) for the max vehicles that you want to spawn it.

PHP код:
CMD:createveh(playeridparams[])  
{  
    static  
    
model,  
    
team;  
    if (
sscanf(params"dd"modelteam))  
    {  
        
SendClientMessage(playerid, -1"/createveh <model> <team>");  
        return 
1;  
    }  
    return 
1;  

in the end of your gamemode ( not in a callback ).
Reply
#3

Thanks bro.
Reply
#4

you can , but it's better to put it after the defines.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)