SA-MP Forums Archive
get destination does work - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: get destination does work (/showthread.php?tid=390794)



get destination does work - ejul - 08.11.2012

SOLVED


Re: get destination does work - DrTHE - 08.11.2012

pawn Код:
// DEST
if(GetPVarInt(i, "Flight") > 0)
{
    format(szString, 100, "DEST:~w~ %s", GetDestination(i));
    TextDrawSetString(TD_2[i], szString);
}
else if(GetPVarInt(i, "Flight") == 0)
{
    TextDrawSetString(TD_2[i], "DEST:~w~ None");
}
if(GetPVarInt(i, "Work") > 0)
{
    format(szString, 100, "DEST:~w~ %s", GetDestination(i));
    TextDrawSetString(TD_2[i], szString);
}
else if(GetPVarInt(i, "Work") == 0)
{
    TextDrawSetString(TD_2[i], "DEST:~w~ None");
}
pawn Код:
stock GetDestination(i)
{
    new IslandName[64];
    if(GetPVarInt(i, "Work") > 0 || GetPVarInt(i, "Flight") > 0)
    {
        if(Island[Las_Venturas][i] > 0)
        {
            format(IslandName, 64, "Las Venturas");
        }
        else if(Island[Los_Santos][i] > 0)
        {
            format(IslandName, 64, "Los Santos");
        }
        else if(Island[San_Fierro][i] > 0)
        {
            format(IslandName, 64, "San Fierro");
        }
        else if(Island[SF_Carrier][i] > 0)
        {
            format(IslandName, 64, "SF Carrier");
        }
        else if(Island[Area69][i] > 0)
        {
            format(IslandName, 64, "Area 69");
        }
    }
    else
    {
        format(IslandName, 64, "None");
    }
    return IslandName;
}
If it fails to be a problem with your variables, 'Flight' or 'Work'.


Re: get destination does work - ejul - 08.11.2012

woww..its work thanks...


Re: get destination does work - travarko17 - 08.11.2012

can anyone help me,why i cant play SA-MP please help?


Re: get destination does work - ejul - 10.11.2012

whAT you mean you cant play samp??