03.10.2011, 15:35
Well i basically need a code for despawning the created vehicles, Heres the code i came up with so far.
Help with be of great appreciation.
CODE
Help with be of great appreciation.
CODE
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new Float:x, Float:y, Float:z;
if(dialogid == DIALOG_VEHMENU)//Weapon System Dialog
{
if(response == 0) return SendClientMessage(playerid, COLOR_RED, "SERVR: You exited the the vehicle system");
switch(listitem)
{
case 0:
{
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName, MAX_PLAYER_NAME);
format(string, sizeof string, "AdmCMD: Admin : %s has spawned a BMX.",pName);
SendClientMessageToAll(COLOR_BRIGHTRED, string);
GetPlayerPos(playerid,x,y,z);
CreateVehicle(481,x-3.0,y,z,0.0,1,1,300);//HERE
}
case 1:
{
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName, MAX_PLAYER_NAME);
format(string, sizeof string, "AdmCMD: Admin : %s has spawned a Sultan.",pName);
SendClientMessageToAll(COLOR_BRIGHTRED, string);
GetPlayerPos(playerid,x,y,z);
CreateVehicle(560,x-3.0,y,z,0.0,1,1,300);//HERE//Here
}
case 2:
{
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName, MAX_PLAYER_NAME);
format(string, sizeof string, "AdmCMD: Admin : %s has spawned a Greenwood.",pName);
SendClientMessageToAll(COLOR_BRIGHTRED, string);
GetPlayerPos(playerid,x,y,z);
CreateVehicle(492,x-3.0,y,z,0.0,1,1,300);//HERE//Here
}
case 3:
{
new string[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName, MAX_PLAYER_NAME);
format(string, sizeof string, "AdmCMD: Admin : %s has spawned a Turismo.",pName);
SendClientMessageToAll(COLOR_BRIGHTRED, string);
GetPlayerPos(playerid,x,y,z);
CreateVehicle(492,x-3.0,y,z,0.0,1,1,300);//HERE//Here//Here
}
case 4:
{
//Something
}
}
}
return 1;
}