27.10.2010, 02:23
Ok this is my Restricted Vehicle code so only 1 Team may use this one vehicle:
And when ever another team member uses any vehicle thats not restricted thay get this message :S
Please tell me what am i doing wrong
:S
Код:
new restrictedvehicle; public OnGameModeInit() { restrictedvehicle = CreateVehicle(520,-1438.48168945,-932.98889160,202.38511658,270.00000000,-1,-1,120); //Hydra restrictedvehicle = CreateVehicle(520,-1452.54101562,-926.71038818,202.62852478,270.00000000,-1,-1,120); //Hydra restrictedvehicle = CreateVehicle(520,-1461.35107422,-917.00463867,203.01586914,270.00000000,-1,-1,120); //Hydra restrictedvehicle = CreateVehicle(520,-1445.40063477,-916.93469238,203.06689453,270.00000000,-1,-1,120); //Hydra restrictedvehicle = CreateVehicle(520,-1433.76928711,-922.97772217,202.83015442,270.00000000,-1,-1,120); //Hydra return 1; } public OnPlayerStateChange(playerid,newstate,oldstate) { if(newstate == PLAYER_STATE_DRIVER) { if(GetPlayerTeam(playerid) != CLASS_MERC && GetPlayerVehicleID(playerid) == restrictedvehicle) { SendClientMessage(playerid,RED,"[ATT]:Type /airstrike Airbourne For Airstrikes At Your Demand!(Cost 1000 Fuel!"); } else { RemovePlayerFromVehicle(playerid); SendClientMessage(playerid,RED,"[ATT]:You Are Not Aloud To Drive This Vehicle!(Merc's Only)"); } } return 1; }
Код:
SendClientMessage(playerid,RED,"[ATT]:You Are Not Aloud To Drive This Vehicle!(Merc's Only)");
:S