(Help) Creating /dropcar - 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)
+--- Thread: (Help) Creating /dropcar (
/showthread.php?tid=305255)
(Help) Creating /dropcar -
viddo - 21.12.2011
Who can help me to create /dropcar script that when i enter a car i /dropcar and then go and export it?
Re: (Help) Creating /dropcar -
Medardo4Life - 22.12.2011
Download the godfather script, search /dropcar.
Re: (Help) Creating /dropcar -
[ABK]Antonio - 22.12.2011
This is ZCMD...i'm sure you know how to implement it into whatever command system you use
pawn Код:
new bool:dropping[MAX_PLAYERS]; //add this at the top
pawn Код:
CMD:dropcar(playerid)
{
if(GetPlayerVehicleID(playerid) != 0)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, Float:x, Float:y, Float:z, Float:size) //put the location of the checkpoint & size
SendClientMessage(playerid, 0x00CCCCAA, "Drop the car off at the checkpoint!");
dropping[playerid] = true;
}
return 1;
}
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
if(dropping[playerid] == true)
{
DisablePlayerCheckpoint(playerid);
new str[128];
reward = 5000;//Input your own reward value
format(str,sizeof(str), "You've earned $%d from dropping a car!", reward);
SendClientMessage(playerid, 0xFF0000AA, str);
GivePlayerMoney(playerid, reward);
dropping[playerid] = false;
}
return 1;
}