18.06.2012, 10:48
You forgot a
after GetPlayerVehicleID
Also you forgot else after !IsPlayerInAnyVehicle
There is a huge problem of
.. lol
next time take care of braces.
Код:
;
Also you forgot else after !IsPlayerInAnyVehicle
There is a huge problem of
Код:
{}
next time take care of braces.
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { new vehicleid = GetPlayerVehicleID(playerid); if (strcmp("/nos", cmdtext, true, 10) == 0) { if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,DarkRed,"You must be in a 616 vehicle."); else { if(GetPlayerMoney(playerid) <5000) return SendClientMessage(playerid,DarkRed,"You need $5000 to buy nos."); else { GivePlayerMoney(playerid, -5000); // -1000 AddVehicleComponent(vehicleid, 1010); // 10x Nitro } } return 1; } if(strcmp(cmdtext,"/help", true, 10) == 0){ SendClientMessage(playerid, DarkRed, "This is a DeathMatch/Stunt/DM server, where you can roam around and kill people!"); SendClientMessage(playerid, DarkRed, "If killing is not your thing you can also Stunt and do a number of other stuff!"); return 1; } if(strcmp(cmdtext,"/health", true, 10) == 0){ SetPlayerHealth(playerid, 100); SendClientMessage(playerid, DarkRed,"Your health has been restored for 1000$!"); GivePlayerMoney(playerid, -1000); return 1; } if(strcmp(cmdtext,"/armor", true, 10) == 0){ SetPlayerArmour(playerid,100); SendClientMessage(playerid, DarkRed,"Your armor has been restored for 2000$!"); GivePlayerMoney(playerid, -2000); return 1; } return 0; }