28.01.2014, 09:34
pawn Код:
CMD:buycar(playerid, params[])
{
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(!IsPlayerInRangeOfPoint(playerid, 2, -135.0201,1116.2260,20.1966)) return SendClientMessage(playerid, COLOR_GREY, "You are not near the vehicles dealership.");
if(PlayerInfo[playerid][vModel] && PlayerInfo[playerid][vVModel] && PlayerInfo[playerid][vVVModel])
{
new string[64]
format(string, sizeof(string), "You already own vehicles ID %d and %d and %d.", PlayerInfo[playerid][pVeh], PlayerInfo[playerid][pVVeh], PlayerInfo[playerid][pVVVeh]);
SendClientMessage(playerid, COLOR_GREY, string);
return 1;
}
new vslot;
if(sscanf(params, "i", vslot)) return SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /buycar [slot]");
if(vslot < 1 || vslot > 3) return SendClientMessage(playerid, COLOR_WHITE, "There are only 3 slots");
Wannabuycarinslot[playerid] = vslot;
SSSShowDialog(playerid, 10);
return 1;
}