18.06.2012, 09:46
Код:
new vehicleid = GetPlayerVehicleID(playerid) if (strcmp("/nos", cmdtext, true, 10) == 0) { if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,DarkRed,"You must be in a vehicle."); { if(GetPlayerMoney(playerid) <5000) return SendClientMessage(playerid,DarkRed,"You need $5000 to buy nos."); { 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;