26.03.2013, 19:54
Sure.
Make sure you change your enum and pInfo and vInfo or cInfo whatever you use, just make sure everything's name correctly, I don't know what your enumerators look like. Shoot me a forum PM if you need any help.
pawn Код:
CMD:setvprice(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_RED, "You can't use this command.");
new vid, price, string[256];
if(sscanf(params, "ii", vid, price)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /setvprice [vehicleid] [price]");
if(!IsValidVehicle(vid)) return SendClientMessage(playerid, COLOR_RED, "There isn't a vehicle with that ID.");
if(IsValidVehicle(vid) && !isnull(params))
{
VehicleInfo[vid][vPrice] = price;
format(string, sizeof(string), "You have change vehicle %d's price to $%d", vid, price);
SendClientMessage(playerid, COLOR_GREEN, string);
}
return 1;
}