22.08.2015, 01:31
How to make. if the player types /overload and sometimes it fails to overload and you didn't failed you will get overloaded how to make it like that?
Код:
new TruckLoad[MAX_PLAYERS];
Код:
CMD:overload(playerid, params[]) { SendMessageToAdmins(playerid, "overload", params); if (GetPlayerTeam(playerid) == 1) { new m = GetVehicleModel(GetPlayerVehicleID(playerid)); if(m == 514 || m == 515 || m == 403 || m == 455) { new t = GetVehicleModel(GetVehicleTrailer(GetPlayerVehicleID(playerid))); if (t == 435 || t == 450 || t == 584 || m == 455) { if (GetPlayerVehicleSeat(playerid) == 0) { new Message[180]; format(Message, sizeof(Message), "Your truck is over loaded!"); SendClientMessage(playerid, WORK, Message); TruckLoad[playerid] = 1; } else { SendClientMessage(playerid, COLOR_LIGHTGREEN, "You are not the driver of this vehicle"); } } else { SendClientMessage(playerid, COLOR_LIGHTGREEN, "You do not have a trailer, please go and attach one!"); } } else { SendClientMessage(playerid, COLOR_LIGHTGREEN, "You are not in a truck, please go and get one!"); } } return 1; }
Код:
if(TruckLoad[playerid] == 0) { SetPlayerScore(playerid, GetPlayerScore(playerid) + 1); } else if(TruckLoad[playerid] == 1) { SetPlayerScore(playerid, GetPlayerScore(playerid) + 2); }