1 question - 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: 1 question (
/showthread.php?tid=242774)
1 question -
tanush - 20.03.2011
How can i make an command with /car [vehicle id] and have vehicles on blacklist like players cant spawn hydra and more? When player spawns, i want the old vehicle to disappear. please help me and thanks
Re : 1 question -
anumaz - 20.03.2011
pawn Код:
new getveh[ MAX_PLAYERS ];
CMD:getveh( playerid, params[ ] )
{
new v1;
if ( sscanf( params, "i", v1 ) )
{
return SendClientMessage(playerid, -1, "Syntax: /getveh <vehicle ID>");
}
if ( getveh[playerid] > 0 ) {
DestroyVehicle(getveh[playerid]);
getveh[playerid] = 0;
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
getveh[playerid] = CreateVehicle(v1, x, y, z, 90, 0, 0, false);
PutPlayerInVehicle(playerid, getveh[playerid], 0);
SendClientMessage(playerid, -1, "You already had a vehicle created. It has been deleted and a new one spawned.");
}
else {
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
getveh[playerid] = CreateVehicle(v1, x, y, z, 90, 0, 0, false);
PutPlayerInVehicle(playerid, getveh[playerid], 0);
SendClientMessage(playerid, -1, "Your vehicle has been created.");
}
return 1;
}
For your "blacklists", just add a "if (v1 != hydra id here) {"
Re: 1 question -
tanush - 21.03.2011
How do i make if player types the half name or full, it will also spawn
Re: 1 question -
Cameltoe - 21.03.2011
Quote:
Originally Posted by tanush
How do i make if player types the half name or full, it will also spawn
|
Take a look into the Ladmin FS, theres an neat /vehicle or /car command there, can't remember what ever it is defined as.
Re: 1 question -
tanush - 21.03.2011
http://forum.sa-mp.com/showthread.ph...ghlight=LAdmin wont work and i really would like one for zcmd
Re: 1 question -
Cameltoe - 21.03.2011
Quote:
Originally Posted by tanush
|
Zcmd and Dcmd works the same way, though Zcmd is easier to use, easier to manage and is proven faster.