23.10.2010, 06:46
here is mate script seatbelt
Put this on top of script
then this put under OnGameModeInit like any different command
i think that i help you :P
Put this on top of script
Код:
new UsingBelt[MAX_PLAYERS];
Код:
if (strcmp(cmd, "/pojas", true) == 0) //just this change on your command put what you want { if(IsPlayerConnected(playerid)) { if(IsPlayerInAnyVehicle(playerid)) { if(!IsModelABike(GetPlayerVehicleID(playerid))) { if(UsingBelt[playerid] == 0) { SendClientMessage(playerid, TEAM_CYAN_COLOR, "* Odkopcava svoj pojas"); // this is when you off your belt format(string, sizeof(string), "* %s skinuo si pojas i izlazis sa sjedala", sendername); // also this is when you off your belt like Vito_Corleone off his belt and he exiting from car ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5); UsingBelt[playerid] = 1; } else { SendClientMessage(playerid, TEAM_CYAN_COLOR, "* Upravo si skinuo svoj pojas"); format(string, sizeof(string), "* %s skida pojas i izlazi sa sjedala", sendername); ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5); UsingBelt[playerid] = 0; } } else { SendClientMessage(playerid, COLOR_GREY,"* Na motoru si, koristi Kacigu! (/kaciga)");// this is nothing if you want to make also /helmet command for motorbikes you can delete this return 1; } } } return 1; }