05.03.2015, 18:23
Buenas, al ejecutar este comando, me dice que no estoy en la posiciуn correcta cuando si lo estoy, miren:
De antemano muchнsimas gracias.
pawn Код:
CMD:fbiduty(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 5, 233.2348, 159.0278, 1003.2322)) return SendClientMessage(playerid, COLOR_RED, "No estбs en la central del FBI");
if(Informacion[playerid][IFaccion] == 2)
if(OnDuty[playerid] == 0)
{
new name[MAX_PLAYER_NAME+1], string[128];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "* Agente %s coge una placa y una pistola de su casillero.", name);
ProxDetector(30.0, playerid, szMessage, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetPlayerColor(playerid, TEAM_FBI_COLOR);
SetPlayerHealth(playerid, 100.0);
SetPlayerArmour(playerid, 100.0);
SetPlayerSkin(playerid, 286);
GivePlayerWeapon(playerid, 24, 5000);
GivePlayerWeapon(playerid, 41, 5000);
GivePlayerWeapon(playerid, 3, 5000);
GivePlayerWeapon(playerid, 29, 5000);
OnDuty[playerid] = 1;
}
else
{
new name[MAX_PLAYER_NAME+1], string[128];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "* Agente %s deja su placa y una pistola en su casillero.", name);
ProxDetector(30.0, playerid, szMessage, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetPlayerColor(playerid, COLOR_BLANCO);
SetPlayerSkin(playerid,Informacion[playerid][ISkin]);
OnDuty[playerid] = 0;
}
return 1;
}
CMD:lspd(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 5, 254.1408, 73.4967, 1003.6625)) return SendClientMessage(playerid, COLOR_RED, "No estбs en LSPD");
if(Informacion[playerid][IFaccion] == 1)
if(OnDuty[playerid] == 0)
{
new name[MAX_PLAYER_NAME+1], string[128];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "* Oficial %s coge una placa y una pistola de su casillero.", name);
ProxDetector(30.0, playerid, szMessage, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetPlayerColor(playerid, TEAM_BLUE_COLOR);
SetPlayerHealth(playerid, 100.0);
SetPlayerArmour(playerid, 100.0);
SetPlayerSkin(playerid, 286);
GivePlayerWeapon(playerid, 24, 5000);
GivePlayerWeapon(playerid, 3, 5000);
OnDuty[playerid] = 1;
}
else
{
new name[MAX_PLAYER_NAME+1], string[128];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "* Oficial %s deja su placa y una pistola en su casillero.", name);
ProxDetector(30.0, playerid, szMessage, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetPlayerColor(playerid, COLOR_BLANCO);
SetPlayerSkin(playerid,Informacion[playerid][ISkin]);
OnDuty[playerid] = 0;
}
return 1;
}