19.04.2012, 01:33
Opa pessoal, como eu posso restringir esse comando para sу poder ser ultilizado em veiculos e nгo em MOTOS!
pawn Код:
if(strcmp(cmd,"/cinto",true)==0)
{
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
SendClientMessage(playerid,COLOR_GREY,"Vocк nгo estб em um veнculo.");
return 1;
}
if(PlayerInfo[playerid][pSeatBelt] == 1)
{
PlayerInfo[playerid][pSeatBelt] = 0;
GetPlayerName(playerid, sendername, sizeof(sendername));
new stringtosee[255];
new ftext[255];
if(PlayerInfo[playerid][pSex] == 1) { ftext = "o"; }
else if(PlayerInfo[playerid][pSex] == 1)
{
ftext = "o";
}
format(stringtosee, sizeof(stringtosee), "%s tirou %s cinto de seguranзa. *", sendername , ftext);
ProxDetector(30.0, playerid, stringtosee, 0xC2A2DAAA,0xC2A2DAAA,0xC2A2DAAA,0xC2A2DAAA,0xC2A2DAAA);
return 1;
}
PlayerInfo[playerid][pSeatBelt] = 1;
GetPlayerName(playerid, sendername, sizeof(sendername));
new stringtosee[255];
new ftext[255];
if(PlayerInfo[playerid][pSex] == 1)
{
ftext = "o";
}
else if(PlayerInfo[playerid][pSex] == 1) { ftext = "o"; }
format(stringtosee, sizeof(stringtosee), "%s colocou %s cinto de seguranзa. *", sendername , ftext);
ProxDetector(30.0, playerid, stringtosee, 0xC2A2DAAA,0xC2A2DAAA,0xC2A2DAAA,0xC2A2DAAA,0xC2A2DAAA);
return 1;
}