SA-MP Forums Archive
ayuda - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: ayuda (/showthread.php?tid=540372)



ayuda - Metzone - 04.10.2014

bueno, lo que pasa, esque cuando llego al punto, me dice que me baje, me bajo y hace el punto, pero tengo arrriba en el primer checkpoint, que no se pueda si no estб en el vehiculo 408, їPorque no me funciona el primer checkpoint? osea me deja continuar, asi valla con un coche de policia.


pawn Код:
if(Basurero[playerid] == 2 && IsPlayerInRangeOfPoint(playerid, 5.0, -1581.6885,-1610.8992,37.3130))
{
new vehicleid;
    vehicleid = GetPlayerVehicleID(playerid);
if(GetVehicleModel(vehicleid) == 408) return SendClientMessageEx(playerid, COLOR_GRAD2, "No estбs en el camion de basura");
if(IsPlayerInAnyVehicle(playerid))return SendClientMessageEx(playerid, COLOR_GRAD2, "Bajate del vehiculo para recoger la basura.");
SetPlayerRaceCheckpoint(playerid,0,-1869.1613,-1389.4199,39.6155,-1981.3489,-1047.8788,32.6252,5);
Basurero[playerid] = 3;
ClearAnimations(playerid);
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
}
if(Basurero[playerid] == 3 && IsPlayerInRangeOfPoint(playerid, 5.0, -1869.1613,-1389.4199,39.6155))
{
if(IsPlayerInAnyVehicle(playerid))return SendClientMessageEx(playerid, COLOR_GRAD2, "Bajate del vehiculo para recoger la basura.");
SetPlayerRaceCheckpoint(playerid,0,-1981.3489,-1047.8788,32.6252,-2248.7751,-115.7061,35.7328,5);
Basurero[playerid] = 4;
ClearAnimations(playerid);
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
}
if(Basurero[playerid] == 4 && IsPlayerInRangeOfPoint(playerid, 5.0, -1981.3489,-1047.8788,32.6252))
{
if(IsPlayerInAnyVehicle(playerid))return SendClientMessageEx(playerid, COLOR_GRAD2, "Bajate del vehiculo para recoger la basura.");
SetPlayerRaceCheckpoint(playerid,0,-2248.7751,-115.7061,35.7328,-2496.6167,-19.9987,26.2298,5);
Basurero[playerid] = 5;
ClearAnimations(playerid);
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
}
if(Basurero[playerid] == 5 && IsPlayerInRangeOfPoint(playerid, 7.0, -2248.7751,-115.7061,35.7328))
{
if(IsPlayerInAnyVehicle(playerid))return SendClientMessageEx(playerid, COLOR_GRAD2, "Bajate del vehiculo para recoger la basura.");
SetPlayerRaceCheckpoint(playerid,0,-2496.6167,-19.9987,26.2298,-2040.1968,316.9506,35.5637,5);
Basurero[playerid] = 6;
ClearAnimations(playerid);
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
}
if(Basurero[playerid] == 6 && IsPlayerInRangeOfPoint(playerid, 7.0, -2496.6167,-19.9987,26.2298))
{
if(IsPlayerInAnyVehicle(playerid))return SendClientMessageEx(playerid, COLOR_GRAD2, "Bajate del vehiculo para recoger la basura.");
SetPlayerRaceCheckpoint(playerid,0,-2040.1968,316.9506,35.5637,-2010.8333,4.9144,34.3345,5);
Basurero[playerid] = 7;
ClearAnimations(playerid);
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
}
if(Basurero[playerid] == 7 && IsPlayerInRangeOfPoint(playerid, 7.0, -2040.1968,316.9506,35.5637))
{
if(IsPlayerInAnyVehicle(playerid))return SendClientMessageEx(playerid, COLOR_GRAD2, "Bajate del vehiculo para recoger la basura.");
SetPlayerRaceCheckpoint(playerid,0,-2010.8333,4.9144,34.3345,-1841.6526,-168.3763,9.6469,5);
Basurero[playerid] = 8;
ClearAnimations(playerid);
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
}
if(Basurero[playerid] == 8 && IsPlayerInRangeOfPoint(playerid, 7.0, -2010.8333,4.9144,34.3345))
{
if(IsPlayerInAnyVehicle(playerid))return SendClientMessageEx(playerid, COLOR_GRAD2, "Bajate del vehiculo para recoger la basura.");
SetPlayerRaceCheckpoint(playerid,0,-1841.6526,-168.3763,9.6469,-1823.0782,-555.2362,16.7232,5);
Basurero[playerid] = 9;
ClearAnimations(playerid);
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
}
if(Basurero[playerid] == 9 && IsPlayerInRangeOfPoint(playerid, 7.0, -1841.6526,-168.3763,9.6469))
{
if(IsPlayerInAnyVehicle(playerid))return SendClientMessageEx(playerid, COLOR_GRAD2, "Bajate del vehiculo para recoger la basura.");
SetPlayerRaceCheckpoint(playerid,0,-1823.0782,-555.2362,16.7232,-1774.9802,-1113.6876,55.6309,5);
Basurero[playerid] = 10;
ClearAnimations(playerid);
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
}
if(Basurero[playerid] == 10 && IsPlayerInRangeOfPoint(playerid, 7.0, -1823.0782,-555.2362,16.7232))
{
if(IsPlayerInAnyVehicle(playerid))return SendClientMessageEx(playerid, COLOR_GRAD2, "Bajate del vehiculo para recoger la basura.");
SetPlayerRaceCheckpoint(playerid,0,-1774.9802,-1113.6876,55.6309,-1720.0469,-1046.4166,75.3676,5);
Basurero[playerid] = 11;
ClearAnimations(playerid);
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
}
if(Basurero[playerid] == 11 && IsPlayerInRangeOfPoint(playerid, 7.0, -1774.9802,-1113.6876,55.6309))
{
if(IsPlayerInAnyVehicle(playerid))return SendClientMessageEx(playerid, COLOR_GRAD2, "Bajate del vehiculo para recoger la basura.");
SetPlayerRaceCheckpoint(playerid,0,-1720.0469,-1046.4166,75.3676,-1272.5011,-1371.5952,119.3127,5);
Basurero[playerid] = 12;
ClearAnimations(playerid);
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
}
if(Basurero[playerid] == 12 && IsPlayerInRangeOfPoint(playerid, 7.0, -1720.0469,-1046.4166,75.3676))
{
if(IsPlayerInAnyVehicle(playerid))return SendClientMessageEx(playerid, COLOR_GRAD2, "Bajate del vehiculo para recoger la basura.");
SetPlayerRaceCheckpoint(playerid,0,-1272.5011,-1371.5952,119.3127,-942.8995,-1899.2073,82.3604,7);
Basurero[playerid] = 13;
ClearAnimations(playerid);
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
}
if(Basurero[playerid] == 13 && IsPlayerInRangeOfPoint(playerid, 7.0, -1272.5011,-1371.5952,119.3127))
{
if(IsPlayerInAnyVehicle(playerid))return SendClientMessageEx(playerid, COLOR_GRAD2, "Bajate del vehiculo para recoger la basura.");
SetPlayerRaceCheckpoint(playerid,0,-1874.8250,-1666.4634,25.6980,-1874.8250,-1666.4634,25.6980,5);
Basurero[playerid] = 14;
ClearAnimations(playerid);
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
}
if(Basurero[playerid] == 14 && IsPlayerInRangeOfPoint(playerid, 7.0, -1874.8250,-1666.4634,25.6980))
{
new string[128];
GivePlayerCash(playerid, 2100);
format(string, sizeof(string), "Bien echo, recogiste la basura de las calles, tu paga es de {00F000}3000$", playerid);
SendClientMessageEx(playerid, COLOR_WHITE, string);
DisablePlayerRaceCheckpoint(playerid);
SetVehicleToRespawn(2);
SetPlayerSkin(playerid, Info[playerid][pChar]);
SetVehicleToRespawn(GetPlayerVehicleID(playerid));
return 1;
}
return 1;
}



Respuesta: ayuda - [J]ulian - 04.10.2014

Si te entendн bien, deberнas cambiar:

pawn Код:
if(GetVehicleModel(vehicleid) == 408)
por:

pawn Код:
if(GetVehicleModel(vehicleid) != 408)
O si quieres usar == tendrнas que hacer asн:

pawn Код:
if(Basurero[playerid] == 2 && IsPlayerInRangeOfPoint(playerid, 5.0, -1581.6885,-1610.8992,37.3130))
{
    new vehicleid = GetPlayerVehicleID(playerid);
    if(GetVehicleModel(vehicleid) == 408)
    {
        if(!IsPlayerInAnyVehicle(playerid))
        {
            SetPlayerRaceCheckpoint(playerid,0, -1869.1613, -1389.4199, 39.6155, -1981.3489, -1047.8788, 32.6252,5);
            Basurero[playerid] = 3;
            ClearAnimations(playerid);
            ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
        } else SendClientMessageEx(playerid, COLOR_GRAD2, "Bajate del vehiculo para recoger la basura.");
    } else SendClientMessageEx(playerid, COLOR_GRAD2, "No estбs en el camion de basura");
}



Re: ayuda - Metzone - 04.10.2014

Lo hize, y bien al principio, me dice que tengo que estar en el camion de basura, pero cuando bajo para recoger la basura, me dice que tengo que estar en el camion de basura.