Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (strcmp("/casco", cmdtext, true, 10) == 0)
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- if(IsModelABike(GetPlayerVehicleID(playerid)))
- {
- if(UsingHelmet[playerid] == 0)
- {
- SendClientMessage(playerid, COLOR_GREEN, "* Ti sei messo il casco");
- GetPlayerName(playerid,pn,sizeof(pn));
- format(string, sizeof(string), "* %s prende un casco dalla sella e lo indossa", pn);
- SendClientMessage(playerid,COLOR_PURPLE,string);
- UsingHelmet[playerid] = 1;
- SetPlayerAttachedObject(playerid, 1, 18645, 2, 0.07, 0.0, 0.0, 88, 75, 0);
- }
- else if(UsingHelmet[playerid] == 1)
- {
- SendClientMessage(playerid, COLOR_GREEN, "* Ti sei tolto il casco");
- GetPlayerName(playerid,pn,sizeof(pn));
- format(string, sizeof(string), "* %s posa il casco sotto la sella", pn);
- SendClientMessage(playerid,COLOR_PURPLE,string);
- UsingHelmet[playerid] = 0;
- }
- }
- else if(!IsModelABike(GetPlayerVehicleID(playerid))) SendClientMessage(playerid, COLOR_RED, "Non sei in una moto o in una bici");
- }
- else if(!IsPlayerInAnyVehicle(playerid) && UsingHelmet[playerid] == 0) SendClientMessage(playerid, COLOR_RED, "Non sei in una moto o in una bici");
- if(!IsPlayerInAnyVehicle(playerid) && UsingHelmet[playerid] == 1)
- {
- SendClientMessage(playerid, COLOR_GREEN, "* Ti sei tolto il casco");
- GetPlayerName(playerid,pn,sizeof(pn));
- format(string, sizeof(string), "* %s si รจ tolto il casco", pn);
- SendClientMessage(playerid,COLOR_PURPLE,string);
- UsingHelmet[playerid] = 0;
- RemovePlayerAttachedObject(playerid, 1);
- }
- return 1;
- }
Add Comment
Please, Sign In to add comment