20.03.2011, 17:00
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
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;
}
http://forum.sa-mp.com/showthread.ph...ghlight=LAdmin wont work and i really would like one for zcmd
|