14.03.2012, 00:19
This could be done via a command dude.
Is this that what you were looking for?
pawn Код:
CMD:v(playerid,params[])
{
new vehicle,choice[24];
if(sscanf(params,"s[24]d",choice,vehicle))
{
return SendClientMessage(playerid,-1,"USAGE: /v buy [vehicleid]");
}
if(!strcmp(choice,"buy",true)) // If they typed buy after /v
{
if(vehicleid == INVALID_VEHICLE_ID) // If the vehicle doesn't exist.
{
return SendClientMessage(playerid,-1,"ERROR: Invalid vehicle id");
}
else
{
CreateVehicle(vehicle/* rest of params go here*/);
// You would then do all your ownership code here
return 1;
}
}
// You could add more /v options by doing this
if(!strcmp(choice,"sell",true))
{
//code here
return 1;
}
return 1;
}