Quote:
Originally Posted by » ded «
Quote:
Originally Posted by Nakash
Hello,i am using this script (GF):
Quote:
if(strcmp(cmd, "/destroycars", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] < 4)
{
SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!");
return 1;
}
for(new i = 0; i < sizeof(CreatedCars); i++)
{
if(i != 0)
{
DestroyVehicle(i);
}
}
SendClientMessage(playerid, COLOR_GREY, " Created Vehicles destroyed !");
}
return 1;
}
|
now,all my cars are CreateVehicle and when i do that it's despawn all the cars.
i want this command to despawn only one car that i will choose,is this possible? Thanks!
|
k ... what I do in my GM is similar, but you have to be in the car to use it.
My command:
Code:
dcmd_despawn(playerid,params[]) {
#pragma unused params
if(PlayerInfo[playerid][Level] >= 3) {
if(IsPlayerInAnyVehicle(playerid)) {
new vehicle = GetPlayerVehicleID(playerid);
SetVehicleToRespawn(vehicle); SendClientMessage(playerid,MANAGEMENT,"*** Vehicle successfully set for respawn!");
return 1;
} else return SendClientMessage(playerid,red,"Error: You need to be in a vehicle to despawn it!");
} else return 0;
}
|
I think it'll respawn it,not despawn..
btw,how do i use this command? it's not like my commands..what is dcmd? it gives me 5 errors.