16.10.2016, 20:12
return 1;
}
IRPeatbelt(playerid, var[])
{
if(!Logged(playerid)) NoLogin(playerid);
if(!IsPlayerInAnyVehicle(playerid)
{
SendClientMessage(playerid, COLOR_GREY, "You are not in a vehicle!");
return 1;
}
new string[50 + MAX_PLAYER_NAME];
if(IsPlayerInAnyVehicle(playerid) && Seatbelt[playerid] == 0)
{
Seatbelt[playerid] = 1;
if(IsABike(GetPlayerVehicleID(playerid)))
{
format(string, sizeof(string), "* %s reaches for their helmet, and puts it on.", GetName(playerid));
SetPlayerAttachedObject(playerid, 1, 18645, 2, 0.059999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
SendClientMessage(playerid, COLOR_WHITE, "You have put on your helmet.");
}
else
{
format(string, sizeof(string), "* %s reaches for their seatbelt, and buckles it up.", GetName(playerid));
SetPlayerAttachedObject( playerid, 2, 18634, 7,0.000000, 0.100000, 0.350000, -35.224993, 45.215000, 1.500000, 5.000000,1.500000, 1.500000,0xAFAFAFAA );
SendClientMessage(playerid, COLOR_WHITE, "You have put on your seatbelt.");
}
}
else if(IsPlayerInAnyVehicle(playerid) && Seatbelt[playerid] == 1)
{
Seatbelt[playerid] = 0;
if(IsABike(GetPlayerVehicleID(playerid)))
{
format(string, sizeof(string), "* %s reaches for their helmet, and takes it off.", GetName(playerid));
RemovePlayerAttachedObject(playerid, 1);
SendClientMessage(playerid, COLOR_WHITE, "You have taken off your helmet.");
}
else
{
format(string, sizeof(string), "* %s reaches for their seatbelt, and unbuckles it.", GetName(playerid));
for(new i;i<5;i++) RemovePlayerAttachedObject(playerid,i);
SendClientMessage(playerid, COLOR_WHITE, "You have taken off your seatbelt.");
}
}
SendNearbyMessage(playerid, 20, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
ERROR:
___________________________________
error 001: expected token: ")", but found "{"
ONE ERROR
}
IRPeatbelt(playerid, var[])
{
if(!Logged(playerid)) NoLogin(playerid);
if(!IsPlayerInAnyVehicle(playerid)
{
SendClientMessage(playerid, COLOR_GREY, "You are not in a vehicle!");
return 1;
}
new string[50 + MAX_PLAYER_NAME];
if(IsPlayerInAnyVehicle(playerid) && Seatbelt[playerid] == 0)
{
Seatbelt[playerid] = 1;
if(IsABike(GetPlayerVehicleID(playerid)))
{
format(string, sizeof(string), "* %s reaches for their helmet, and puts it on.", GetName(playerid));
SetPlayerAttachedObject(playerid, 1, 18645, 2, 0.059999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000);
SendClientMessage(playerid, COLOR_WHITE, "You have put on your helmet.");
}
else
{
format(string, sizeof(string), "* %s reaches for their seatbelt, and buckles it up.", GetName(playerid));
SetPlayerAttachedObject( playerid, 2, 18634, 7,0.000000, 0.100000, 0.350000, -35.224993, 45.215000, 1.500000, 5.000000,1.500000, 1.500000,0xAFAFAFAA );
SendClientMessage(playerid, COLOR_WHITE, "You have put on your seatbelt.");
}
}
else if(IsPlayerInAnyVehicle(playerid) && Seatbelt[playerid] == 1)
{
Seatbelt[playerid] = 0;
if(IsABike(GetPlayerVehicleID(playerid)))
{
format(string, sizeof(string), "* %s reaches for their helmet, and takes it off.", GetName(playerid));
RemovePlayerAttachedObject(playerid, 1);
SendClientMessage(playerid, COLOR_WHITE, "You have taken off your helmet.");
}
else
{
format(string, sizeof(string), "* %s reaches for their seatbelt, and unbuckles it.", GetName(playerid));
for(new i;i<5;i++) RemovePlayerAttachedObject(playerid,i);
SendClientMessage(playerid, COLOR_WHITE, "You have taken off your seatbelt.");
}
}
SendNearbyMessage(playerid, 20, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
ERROR:
___________________________________
error 001: expected token: ")", but found "{"
ONE ERROR