30.11.2012, 16:16
Hello, i have a small problem with this command in my server, i tried to make it but here its define
and here is the command
Where to put it if i want it in a filterscript not a gamemode so where to place it ? and if anyone see something wrong in that code please tell
pawn Код:
#define VSTORAGE 19104
pawn Код:
CMD:vstorage(playerid, params[])
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == VSTORAGE 19104)
new vstring[1024];
for(new i, iModelID; i < MAX_PLAYERVEHICLES; i++) {
if((iModelID = PlayerVehicleInfo[playerid][i][pvModelId] - 400) >= 0) {
if(PlayerVehicleInfo[playerid][i][pvImpounded]) {
format(vstring, sizeof(vstring), "%s\n%s (impounded)", vstring, VehicleName[iModelID]);
}
else if(PlayerVehicleInfo[playerid][i][pvDisabled]) {
format(vstring, sizeof(vstring), "%s\n%s (disabled)", vstring, VehicleName[iModelID]);
}
else if(!PlayerVehicleInfo[playerid][i][pvSpawned]) {
format(vstring, sizeof(vstring), "%s\n%s (stored)", vstring, VehicleName[iModelID]);
}
else format(vstring, sizeof(vstring), "%s\n%s (spawned)", vstring, VehicleName[iModelID]);
}
else strcat(vstring, "\nEmpty");
}
ShowPlayerDialog(playerid, VSTORAGE, DIALOG_STYLE_LIST, "Vehicle storage", vstring, "(De)spawn", "Cancel");
return 1;
}