Vehicle 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Vehicle problem (
/showthread.php?tid=246183)
Vehicle problem -
tbedy - 03.04.2011
i using gamemode: Carlito's Rolepay
i have problem with putting cars in script, i load DEBUG and make cars but i dont know hot to park or put in script, plz help
i have coordinates of cars, but can't park or something like that
---
and how to put in my script command /o, when admins write with write color..
i want that only rcon admins can write with /o ..
plz help me
Re: Vehicle problem -
mprofitt - 03.04.2011
Carlito's script has vehicle controls. Look at the admin command section of the script. You can also type /acarcmds.
pawn Код:
"[Level 5:] - /acarpark - /acarmodel - /acarcolor - /acarfaction - /acarenter - /acartype - /acarsetpos"
For you other question, see this page.
https://sampwiki.blast.hk/wiki/IsPlayerAdmin
Re: Vehicle problem -
tbedy - 03.04.2011
but dont have for spawning vehicles, i need through debug spawn vehicles, but then i need to do GMX and all gone...
Re: Vehicle problem -
mprofitt - 03.04.2011
write a simple function to create a non-manage vehicle.
pawn Код:
dcmd_createveh(playerid, params[])
{
if(GetPlayerInterior(playerid) == 0)
{
new model;
if(sscanf(params, "d", model))
{
model = 451;
}
if(model > 399 && model < 612)
{
new
veh,
Float:x,
Float:y,
Float:z,
Float:a;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, a);
veh = CreateVehicle(model, x, y, z, a, 0, 1, 600);
SetVehicleVirtualWorld(veh, GetPlayerVirtualWorld(playerid));
PutPlayerInVehicle(playerid, veh, 0);
}
else SendClientMessage(playerid, COLOR_SYSTEMMSG, "[System:] Invalid Vehicle ID.");
}
else SendClientMessage(playerid, COLOR_SYSTEMMSG, "[System:] You cannot create a vehicle within this interior.");
return 1;
}
Re: Vehicle problem -
tbedy - 03.04.2011
and where i write my coordinates and ID of vehicle?
here?
Quote:
CreateVehicle(model, x, y, z, a, 0, 1, 600);
|
and what i need to write here?:
Quote:
GetPlayerPos(playerid, x, y, z);
|
Re: Vehicle problem -
mprofitt - 03.04.2011
Quote:
Originally Posted by tbedy
and where i write my coordinates and ID of vehicle?
here?
and what i need to write here?:
|
uhhhm, ok
Re: Vehicle problem -
tbedy - 03.04.2011
why this eerror?
Quote:
C:\Documents and Settings\Toni Bedy\Desktop\lecevica 2\gamemodes\crp.pwn(16799) : warning 203: symbol is never used: "dcmd_createveh"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
Header size: 6188 bytes
Code size: 559196 bytes
Data size: 2686684 bytes
Stack/heap size: 16384 bytes; estimated max. usage=4086 cells (16344 bytes)
Total requirements: 3268452 bytes
1 Warning.
|
Re: Vehicle problem -
mprofitt - 03.04.2011
You can not copy/paste the function I posted. It is for example only. You need to adapt the function for your script.
Re: Vehicle problem -
tbedy - 03.04.2011
i try but i dont know :(
i put on top of the script this:
Quote:
#define dcmd(%1,%2,%3) \
if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || \
(((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
|
and i think that i now need somewhere put(i think in OnPlayerCommandText):
Re: Vehicle problem -
tbedy - 03.04.2011
plssssssssss help
i dont know how to put this in the script!