ADMINCAR!!!
#5

Pos needs to be a float.

I'm not sure what you're trying to do with carid.

A better way of doing this entire thing would be:

PHP код:
new bool:AdminVehicle[MAX_VEHICLES];
CMD:admincar(playeridparams[])
{
    if(!
IsPlayerAdmin(playerid)) 
        return 
SendClientMessage(playeridCOLOR_RED"No admin");
    
    new
        
modelid,
        
vehicleid,
        
Float:Pos[3],
        
str[128],
        
name[32]
    ; 
    
    if(
sscanf(params"i"modelid))
        return 
SendClientMessage(playeridCOLOR_RED"/adminkocsi [ Jбrmű ID ]");
    
    if(
modelid 400 || modelid 611)
        return 
SendClientMessage(playeridCOLOR_RED"You specified an invalid model."); 
        
    
GetPlayerPos(playeridPos[0], Pos[1], Pos[2]); 
    
    
vehicleid CreateVehicle(modelidPos[0], Pos[1], Pos[2], 90.0random(255), random(255), -1); 
    
SetVehicleNumberPlate(vehicleid"Admin"); 
    
    
SetVehicleToRespawn(vehicleid);
    
AdminVehicle[vehicleid] = true;
    
    
format(name32"%s"RealName[modelid 400]); 
    
    
format(strsizeof(str), "(( You spawned an admin car. Vehicle ID: %i, Name: %s ))"vehicleidname);
    
SendClientMessage(playeridCOLOR_REDstr); 
    return 
1;

Reply


Messages In This Thread
ADMINCAR!!! - by BrnX - 09.09.2017, 21:30
Re: ADMINCAR!!! - by JasonRiggs - 09.09.2017, 21:43
Re: ADMINCAR!!! - by BrnX - 09.09.2017, 21:53
Re: ADMINCAR!!! - by BrnX - 09.09.2017, 22:01
Re: ADMINCAR!!! - by Kane - 09.09.2017, 22:13
Re: ADMINCAR!!! - by BrnX - 09.09.2017, 22:27
Re: ADMINCAR!!! - by Kane - 09.09.2017, 22:30
Re: ADMINCAR!!! - by BrnX - 09.09.2017, 22:34

Forum Jump:


Users browsing this thread: 1 Guest(s)