SA-MP Forums Archive
enter command? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: enter command? (/showthread.php?tid=166758)



enter command? - Luis- - 09.08.2010

pawn Код:
dcmd_enter(playerid, params[])
{
    if(PlayerToPoint(5.0, playerid, ,1480.8611, -1771.3727, 8.7958;
    SendClientMessage(playerid, COLOR_YELLOW, "Welcome to City Hall");
    return 1;
}
The PlayerToPoint is giving me errors and Warnings

Код:
C:\Users\BooNii3\Geramia RP\LS-RP\gamemodes\LSRP.pwn(154) : error 029: invalid expression, assumed zero
C:\Users\BooNii3\Geramia RP\LS-RP\gamemodes\LSRP.pwn(154) : warning 215: expression has no effect
C:\Users\BooNii3\Geramia RP\LS-RP\gamemodes\LSRP.pwn(154) : warning 215: expression has no effect
C:\Users\BooNii3\Geramia RP\LS-RP\gamemodes\LSRP.pwn(154) : warning 215: expression has no effect



Re: enter command? - Daren_Jacobson - 09.08.2010

pawn Код:
dcmd_enter(playerid, params[])
{
    if(PlayerToPoint(5.0, playerid, 1480.8611, -1771.3727, 8.7958))
        SendClientMessage(playerid, COLOR_YELLOW, "Welcome to City Hall");
    return 1;
}



Re: enter command? - Luis- - 09.08.2010

Thanks it is fixed now


Re: enter command? - Luis- - 09.08.2010

I now have another problem :/,

pawn Код:
dcmd_enter(playerid, params[])
{
    {
        #pragma unused params
        PlayerToPoint(25.0, playerid, 1480.8611,-1771.3727,18.7958);
        SendClientMessage(playerid, COLOR_YELLOW, "Welcome to City Hall");
        SetPlayerInterior(playerid, 3);
        SetPlayerPos(playerid, 384.808624,173.804992,1008.382812);
    }
    {
        PlayerToPoint(25.0, playerid, 1554.6921, -1675.5272, 16.1953);
        SendClientMessage(playerid, COLOR_YELLOW, "Welcome to LSPD");
        SetPlayerInterior(playerid, 3);
        SetPlayerPos(playerid, 288.745971, 169.350997, 1007.171875);
        return 1;
    }
}
Can you fix the command so that i can enter the City Hall at the pickup for City Hall and I can enter LSPD at the Pickup for LSPD?


Re: enter command? - Daren_Jacobson - 09.08.2010

pawn Код:
dcmd_enter(playerid, params[])
{
        #pragma unused params
    if (PlayerToPoint(5.0, playerid, 1480.8611,-1771.3727,18.7958))
    {
        SendClientMessage(playerid, COLOR_YELLOW, "Welcome to City Hall");
        SetPlayerInterior(playerid, 3);
        SetPlayerPos(playerid, 384.808624,173.804992,1008.382812);
    }
    else if (PlayerToPoint(5.0, playerid, 1554.6921, -1675.5272, 16.1953))
    {
        SendClientMessage(playerid, COLOR_YELLOW, "Welcome to LSPD");
        SetPlayerInterior(playerid, 3);
        SetPlayerPos(playerid, 288.745971, 169.350997, 1007.171875);
    }
    return 1;
}



Re: enter command? - willsuckformoney - 09.08.2010

pawn Код:
dcmd_enter(playerid, params[])
{
    #pragma unused params
    if(PlayerToPoint(25.0, playerid, 1480.8611,-1771.3727,18.7958)) {
        SendClientMessage(playerid, COLOR_YELLOW, "Welcome to City Hall");
        SetPlayerInterior(playerid, 3);
        SetPlayerPos(playerid, 384.808624,173.804992,1008.382812);
    }
    if(PlayerToPoint(25.0, playerid, 1554.6921, -1675.5272, 16.1953)) {
        SendClientMessage(playerid, COLOR_YELLOW, "Welcome to LSPD");
        SetPlayerInterior(playerid, 3);
        SetPlayerPos(playerid, 288.745971, 169.350997, 1007.171875);
    }
    return 1;
}
Compiles fine, didn't test because i felt no need to


Re: enter command? - Luis- - 09.08.2010

Thanks