Nos problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Nos problem (
/showthread.php?tid=412226)
Nos problem -
nor15 - 01.02.2013
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(playerid, 1010);
return 1;
}
Re: Nos problem -
Threshold - 01.02.2013
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.