16.10.2010, 10:17
Hi. I have a short question. I wrote a simple command for a FS and when i type in /buycar , it says Server: Unknown command. So, here is the script:
If you see something wrong please tell me.
Thanks for help
Код:
if(strcmp(cmd, "/buycar", true) == 0) { new car = GetPlayerVehicleID(playerid); if(CarInfo[car][cOwned]==0) { if(GetPlayerCash(playerid) >= CarInfo[car][cPrice]) { if(PlayerInfo[playerid][pCar1] == 999) { SendClientMessage(playerid,COLOR_BLUE,"Car1"); return 1; } if(PlayerInfo[playerid][pCar2] == 999) { SendClientMessage(playerid,COLOR_BLUE,"Car2"); return 1; } } else { format(string,sizeof(string),"[Car Dealership] You don't have $%d",CarInfo[car][cPrice]); SendClientMessage(playerid,COLOR_BLUE,string); return 1; } } else { format(string,sizeof(string),"You can't buy this car. Car owned by: %s",CarInfo[car][cOwner]); SendClientMessage(playerid,COLOR_BLUE,string); return 1; } }
Thanks for help