06.11.2014, 18:56
Quote:
I would suggest you to only use SendLocalMessage because you are using SendMeMessage in only /me command, right? So you can simply write something like this:
pawn Code:
|
pawn Code:
CMD:seatbelt(playerid, params[])
{
if(!IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COLOR_GREY, "You are not inside a vehicle!");
}
else
{
new eqstr[1024], ueqstr[1024];
//eqstr = CreatePlayerMeString(playerid, "reaches over to grab his seatbelt before clipping it in.");
//ueqstr = CreatePlayerMeString(playerid, "reaches down to unclip his seatbelt before letting it slide back.");
format(eqstr, sizeof(eqstr), "* %s reaches over to grab his seatbelt before clipping it in.", ReturnName(playerid));
format(ueqstr, sizeof(ueqstr), "* %s reaches over to grab his seatbelt before clipping it in.", ReturnName(playerid));
if(!IsPlayerSeatbelt(playerid))
{
SendLocalClientMessage(playerid, 30.0, COLOR_RP, eqstr);
Seatbelt[playerid] = true;
}
else if(IsPlayerSeatbelt(playerid))
{
SendLocalClientMessage(playerid, 30.0, COLOR_RP, ueqstr);
Seatbelt[playerid] = false;
}
}
return 1;
}