YCMD:seatbelt(playerid, params[], help) { if(help) { SendClientMessage(playerid, X11_WHITE, "Toggles the vehicle seatbelt"); return 1; } if(!IsPlayerInAnyVehicle(playerid) || !HasSeatbelts(GetVehicleModel(GetPlayerVehicleID(playerid)))) { //line 124 SendClientMessage(playerid, COLOR_LIGHTRED, " You need to be in a car!"); return 1; } new string[53]; if(!Seatbelt[playerid]) { Seatbelt[playerid] = true; format(string, sizeof(string), "* %s buckles %s seatbelt up.", GetPlayerNameEx(playerid,ENameType_RPName), getPossiveAdjective(playerid)); } else { Seatbelt[playerid] = false; format(string, sizeof(string), "* %s unbuckles %s seatbelt.", GetPlayerNameEx(playerid,ENameType_RPName), getPossiveAdjective(playerid)); } ProxMessage(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); return 1; }
YCMD:checksb(playerid, params[], help)
{
if(help) {
SendClientMessage(playerid, X11_WHITE, "Check if you are wearing the seat belt or not");
return 1;
}
if(!IsPlayerInAnyVehicle(playerid) || !HasSeatbelts(GetVehicleModel(GetPlayerVehicleID(playerid))))
{ //line 124
SendClientMessage(playerid, COLOR_LIGHTRED, "You need to be in a car!");
return 1;
}
if(!Seatbelt[playerid])
{
SendClientMessage(playerid,-1,"You aren't wearing a seat belt");
}
else
{
SendClentMessage(playerid,-1,"You are wearing a seat belt");
}
return 1;
}
CMD:cb(playerid, params[]) return cmd_checkbelt(playerid, params);
CMD:checkbelt(playerid, params[])
{
new giveplayerid;
if(sscanf(params, "u", giveplayerid)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /checkbelt [playerid]");
if(GetPlayerState(giveplayerid) == PLAYER_STATE_ONFOOT)
{
SendClientMessageEx(playerid,COLOR_GREY,"That player is not in any vehicle!");
return 1;
}
if (ProxDetectorS(9.0, playerid, giveplayerid))
{
new string[128];
new stext[4];
if(Seatbelt[giveplayerid] == 0) { stext = "off"; }
else { stext = "on"; }
if(IsABike(GetPlayerVehicleID(playerid)))
{
format(string, sizeof(string), "%s's helmet is currently %s." , GetPlayerNameEx(giveplayerid) , stext);
SendClientMessageEx(playerid,COLOR_WHITE,string);
format(string, sizeof(string), "* %s looks at %s, checking to see if they are wearing a helmet.", GetPlayerNameEx(playerid),GetPlayerNameEx(giveplayerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else
{
format(string, sizeof(string), "%s's seat belt is currently %s." , GetPlayerNameEx(giveplayerid) , stext);
SendClientMessageEx(playerid,COLOR_WHITE,string);
format(string, sizeof(string), "* %s peers through the window at %s, checking to see if they are wearing a seatbelt.", GetPlayerNameEx(playerid),GetPlayerNameEx(giveplayerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
}
else { SendClientMessageEx(playerid, COLOR_GREY, "You are not around that player!"); }
return 1;
}
ecrp\seatbelt.pwn(312) : error 017: undefined symbol "SendClentMessage" ecrp\seatbelt.pwn(314) : warning 217: loose indentation
YCMD:checksb(playerid, params[], help) { if(help) { SendClientMessage(playerid, X11_WHITE, "Check if you are wearing the seat belt or not"); return 1; } if(!IsPlayerInAnyVehicle(playerid) || !HasSeatbelts(GetVehicleModel(GetPlayerVehicleID(playerid)))) { //line 124 SendClientMessage(playerid, COLOR_LIGHTRED, "You need to be in a car!"); return 1; } if(!Seatbelt[playerid]) { SendClientMessage(playerid,-1,"You aren't wearing a seat belt"); } else { SendClentMessage(playerid,-1,"You are wearing a seat belt"); } return 1; }
Код:
ecrp\seatbelt.pwn(306) : warning 217: loose indentation ecrp\seatbelt.pwn(312) : error 017: undefined symbol "SendClentMessage" ecrp\seatbelt.pwn(314) : warning 217: loose indentation Код:
YCMD:checksb(playerid, params[], help) { if(help) { SendClientMessage(playerid, X11_WHITE, "Check if you are wearing the seat belt or not"); return 1; } if(!IsPlayerInAnyVehicle(playerid) || !HasSeatbelts(GetVehicleModel(GetPlayerVehicleID(playerid)))) { //line 124 SendClientMessage(playerid, COLOR_LIGHTRED, "You need to be in a car!"); return 1; } if(!Seatbelt[playerid]) { SendClientMessage(playerid,-1,"You aren't wearing a seat belt"); } else { SendClentMessage(playerid,-1,"You are wearing a seat belt"); } return 1; } |
YCMD:checksb(playerid, params[], help)
{
if(help) {
SendClientMessage(playerid, X11_WHITE, "Check if you are wearing the seat belt or not");
return 1;
}
if(!IsPlayerInAnyVehicle(playerid) || !HasSeatbelts(GetVehicleModel(GetPlayerVehicleID(playerid))))
{ //line 124
SendClientMessage(playerid, COLOR_LIGHTRED, "You need to be in a car!");
return 1;
}
if(!Seatbelt[playerid])
{
SendClientMessage(playerid,-1,"You aren't wearing a seat belt");
}
else
{
SendClientMessage(playerid,-1,"You are wearing a seat belt");
}
return 1;
}
YCMD:checkseatbelt(playerid, params[], help)
{
new id;
if(sscanf(params,"u",id)) return SendClientMessage(playerid,COLOR_RED,"/checkseatbelt [playerid]");
if(help) {
SendClientMessage(playerid, X11_WHITE, "Check if a player is wearing the seat belt or not");
return 1;
}
if(!IsPlayerInAnyVehicle(id) || !HasSeatbelts(GetVehicleModel(GetPlayerVehicleID(id))))
{ //line 124
SendClientMessage(playerid, COLOR_LIGHTRED, "This player need to be in a car!");
return 1;
}
if(!Seatbelt[id])
{
SendClientMessage(playerid,-1,"This player isn't wearing a seat belt");
}
else
{
SendClientMessage(playerid,-1,"this player is wearing a seat belt");
}
return 1;
}