23.02.2011, 19:49
intao tb axei que erra isso mas n consegui axar onde
olha coloquei o comando assim
public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
{
if(newkeys == 16 && GetPlayerState(playerid) == 1)
{
for(new a; a < sizeof zMaquinas; a++)
{
if(IsPlayerInRangeOfPoint(i,3.0,zMaquinas[a][0],zMaquinas[a][1],zMaquinas[a][2]))
{
GivePlayerMoney(playerid,-2);
new
Float:zHealth;
GetPlayerHealth(playerid,Float:zHealth);
SetPlayerHealth(playerid,(Float:zHealth + 15.0));
}
}
}
return 1;
}
new string[128];
PlayerInactivity[playerid] = 0;
if(newkeys == 16 && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
OnPlayerCommandText(playerid,"/sair");
}
if(newkeys == 16 && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
OnPlayerCommandText(playerid,"/entrando");
OnPlayerCommandText(playerid,"/saindo");
OnPlayerCommandText(playerid,"/entrar");
OnPlayerCommandText(playerid,"/saidaemegencia");
OnPlayerCommandText(playerid,"/sair");
if(PlayerToPoint(3,playerid,229.7267,165.0443,1003 .0234) && IsACop(playerid))
{
olha coloquei o comando assim
public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
{
if(newkeys == 16 && GetPlayerState(playerid) == 1)
{
for(new a; a < sizeof zMaquinas; a++)
{
if(IsPlayerInRangeOfPoint(i,3.0,zMaquinas[a][0],zMaquinas[a][1],zMaquinas[a][2]))
{
GivePlayerMoney(playerid,-2);
new
Float:zHealth;
GetPlayerHealth(playerid,Float:zHealth);
SetPlayerHealth(playerid,(Float:zHealth + 15.0));
}
}
}
return 1;
}
new string[128];
PlayerInactivity[playerid] = 0;
if(newkeys == 16 && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
OnPlayerCommandText(playerid,"/sair");
}
if(newkeys == 16 && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
OnPlayerCommandText(playerid,"/entrando");
OnPlayerCommandText(playerid,"/saindo");
OnPlayerCommandText(playerid,"/entrar");
OnPlayerCommandText(playerid,"/saidaemegencia");
OnPlayerCommandText(playerid,"/sair");
if(PlayerToPoint(3,playerid,229.7267,165.0443,1003 .0234) && IsACop(playerid))
{