/destroyv problem +REP!!
#1

Hello guys, im have RP server and there Family/gangs cars...im make this command to remove the car But when I enter the car and tybe /destroy the car Deleted But when Restart server or Close the black windows and reopen the cars back... Help me please This the command what I have or who have another command give me
pawn Код:
CMD:destroyv(playerid, params[])
{
     new pName[MAX_PLAYER_NAME];
     new string[256]; // ; was missing
     new testcar= GetPlayerVehicleID(playerid);
     GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
     format(string, sizeof(string), "[Information]: %s has Destroyed a Vehicle !", pName);
     SendClientMessageToAll(0xFFFFFFFF, string);
     DestroyVehicle(testcar);
     return 1;
}
Thanks for Healpers!!
Reply
#2

what error dude
Reply
#3

try this one

pawn Код:
DelVehicle(vehicleid)
{
    for(new players=0;players<=MAX_PLAYERS;players++)
    {
        new Float:X,Float:Y,Float:Z;
        if (IsPlayerInVehicle(players,vehicleid))
        {
        GetPlayerPos(players,X,Y,Z);
        SetPlayerPos(players,X,Y,Z+2);
        SetVehicleToRespawn(vehicleid);
        }
        SetVehicleParamsForPlayer(vehicleid,players,0,1);
    }
    SetTimerEx("VehRes",3000,0,"d",vehicleid);
    return 1;
}
pawn Код:
dcmd_destroyv(playerid,params[])
{
    #pragma unused params
     if(IsPlayerInAnyVehicle(playerid))
     {
        DelVehicle(GetPlayerVehicleID(playerid));
        SendClientMessage(playerid,-1,"You've successfully Destroyed This car");
     }
     else
     {
        SendClientMessage(playerid,red,"Error: You must sit in the Car before using  this command!");
     }
    return 1;
}
Reply
#4

Quote:
Originally Posted by IceBilizard
Посмотреть сообщение
try this one

pawn Код:
DelVehicle(vehicleid)
{
    for(new players=0;players<=MAX_PLAYERS;players++)
    {
        new Float:X,Float:Y,Float:Z;
        if (IsPlayerInVehicle(players,vehicleid))
        {
        GetPlayerPos(players,X,Y,Z);
        SetPlayerPos(players,X,Y,Z+2);
        SetVehicleToRespawn(vehicleid);
        }
        SetVehicleParamsForPlayer(vehicleid,players,0,1);
    }
    SetTimerEx("VehRes",3000,0,"d",vehicleid);
    return 1;
}
pawn Код:
dcmd_destroyv(playerid,params[])
{
    #pragma unused params
     if(IsPlayerInAnyVehicle(playerid))
     {
        DelVehicle(GetPlayerVehicleID(playerid));
        SendClientMessage(playerid,-1,"You've successfully Destroyed This car");
     }
     else
     {
        SendClientMessage(playerid,red,"Error: You must sit in the Car before using  this command!");
     }
    return 1;
}
he say after i restart his server, the vehicle was respawn so, his problem is

CreateVehicle



sorry if i am wrong
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)