Nos problem
#1

I use this command , but nothing added to the vehicle
PHP код:
dcmd_rnos(playerid,params[])
{
    
#pragma unused params
    
if(IsSpawned[playerid] != 1)
    {
        
SendClientMessage(playerid,COLOR_ERROR,"You must be alive and spawned in order to be able to use this command.");
        return 
1;
    }
    if(!
IsPlayerInAnyVehicle(playerid))
    {
        
SendClientMessage(playerid,COLOR_ERROR,"You must be in a vehicle in order to be able to use this command.");
        return 
1;
    }
    if(
IsRegularPlayer[playerid] != 1337)
    {
        
SendClientMessage(playerid,COLOR_ERROR,"You must be a Regular Player in order to use this command.");
        return 
1;
    }
    
AddVehicleComponent(playerid1010);
    return 
1;

Reply
#2

pawn Код:
AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
You are adding it to a vehicle, so you need a vehicleid, not a playerid.
Read: https://sampwiki.blast.hk/wiki/GetPlayerVehicleID
https://sampwiki.blast.hk/wiki/AddVehicleComponent

Look at the parameters.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)