SA-MP Forums Archive
Whats wrong with this code? - 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: Whats wrong with this code? (/showthread.php?tid=299582)



Whats wrong with this code? - vent - 26.11.2011

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
        new masinaid = GetPlayerVehicleID(playerid);
        if(tAuto[masinaid][Kytus] <= 0)
        {
            GameTextForPlayer(playerid,"~w~Autos ei ole bensiini~n~~r~Kasuta kanistrit voi kutsu mehaanik", 3000, 5);
            tAuto[masinaid][Mootor] = 0;
            TogglePlayerControllable(playerid, 0);
        }
        if(newstate==PLAYER_STATE_DRIVER)
        {
             SetTimerEx("Speedometer", 500, true, "i", playerid);
             TextDrawShowForPlayer(playerid, speedom[playerid]);
        }
        else
        {
            TextDrawHideForPlayer(playerid,speedom[playerid]);
            TextDrawSetString(speedom[playerid], "         ");
        }
    return 1;
}
Whats wrong with this code? It will give me over 30 errors all over the script.