How can i delete cars ?
#1

Hello again , im using united-rp mod.There is some cars in the game i can't delete.There is command like /deletefcar > Deletes family car , /deletepcar > Deleteplayercar , /deletepermcar > deletes permanent cars.But some cars i can't delete and there isn't have any command like that , so i checked all cars and noticed the ones which i'm going to delete but i don't know how.How can i delete on fscript or somewhere else ? sorry for bad english
Reply
#2

save the vehicle id into an array when you create it like so
array_name=CreateVehicle();
then use the function DestroyVehicle(array_name); to destroy it.
Reply
#3

Quote:
Originally Posted by xkirill
Посмотреть сообщение
save the vehicle id into an array when you create it like so
array_name=CreateVehicle();
then use the function DestroyVehicle(array_name); to destroy it.
Sorry but what's array ? i don't understand pawn so much.I just translated it to my language and i want to use.There isn't too much bug in this mod but i need to edit it first ingame.Factions businesses vs....Can u be more spesific ?
Reply
#4

Can somebody help ? i need a deletecar command.i need deletecar command
Reply
#5

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
     if(strcmp(cmdtext, "/destroyveh", true) == 0)
     {
          new vehicleid;
          vehicleid= GetPlayerVehicleID(playerid);
          DestroyVehicle(vehicleid);
          return 1;
     }
 
     return 0;
}
https://sampwiki.blast.hk/wiki/DestroyVehicle
Reply
#6

Quote:
Originally Posted by ThunderX
Посмотреть сообщение
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
     if(strcmp(cmdtext, "/destroyveh", true) == 0)
     {
          new vehicleid;
          vehicleid= GetPlayerVehicleID(playerid);
          DestroyVehicle(vehicleid);
          return 1;
     }
 
     return 0;
}
https://sampwiki.blast.hk/wiki/DestroyVehicle
How can i add it to the pawn ? Where do i gonna put it ?Im not good at pawn an my pawner is really busy on theese days.
Reply
#7

Put it under OnPlayerCommandText.

If you haven't used OnPlayerCommandText yet, you can just copy that code and paste it on your script.
Reply
#8

You are too new to scripting start from here https://sampwiki.blast.hk/wiki/Scripting_Basics

If you don't understand nothing just transtale to your language.

Good luck.
Reply
#9

Your pawner?
Go on ******* and watch pawn tutorials, or read tutorials on SAMP wiki or here on the forums.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)