SA-MP Forums Archive
Pawno crashes with rank system? - 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: Pawno crashes with rank system? (/showthread.php?tid=396363)



Pawno crashes with rank system? - Mustafa6155 - 30.11.2012

Hello guys i maked an rank system but me Pawno crash here is me Gm not much
Please help me with fix it?

http://pastebin.com/zT2N8jCb


Re: Pawno crashes with rank system? - Alcatraz Gaming - 30.11.2012

You mind translating the GM? Can't understand the rank codes


Re: Pawno crashes with rank system? - Mustafa6155 - 30.11.2012

New i searched this
https://sampforum.blast.hk/showthread.php?tid=358453
i changed te rank names and score and then crash?


Re: Pawno crashes with rank system? - Faisal_khan - 30.11.2012

You had an extra bracket under OnPlayerSpawn
pawn Код:
public OnPlayerSpawn(playerid)
{
    TextDrawShowForPlayer(playerid, Textdraw0);
    TextDrawShowForPlayer(playerid, Textdraw1);
    TextDrawShowForPlayer(playerid, Textdraw2);
    TextDrawShowForPlayer(playerid, Textdraw3);
    TextDrawShowForPlayer(playerid, Textdraw4);
    TextDrawShowForPlayer(playerid, Textdraw5);
    TextDrawShowForPlayer(playerid, Textdraw6);
    TextDrawShowForPlayer(playerid, Textdraw7);
    TextDrawShowForPlayer(playerid, Textdraw8);
    TextDrawShowForPlayer(playerid, Textdraw9);
    TextDrawShowForPlayer(playerid, Textdraw10);
    TextDrawShowForPlayer(playerid, Textdraw11);
    TextDrawShowForPlayer(playerid, Textdraw12);
    TextDrawShowForPlayer(playerid, Textdraw13);
    TextDrawHideForPlayer(playerid, Textdraw14);
    TextDrawHideForPlayer(playerid, Textdraw15);
    TextDrawHideForPlayer(playerid, Textdraw16);
    TextDrawHideForPlayer(playerid, Textdraw17);
    TextDrawHideForPlayer(playerid, Textdraw18);
    TextDrawHideForPlayer(playerid, Textdraw19);
    TextDrawHideForPlayer(playerid, Textdraw20);
    if(GetPlayerScore(playerid) > 0 && GetPlayerScore(playerid) < 10)
    {
        new Text3D:label = Create3DTextLabel("Soldaat der 3e klasse",GREEN, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) > 50 && GetPlayerScore(playerid) < 50)
    {
        new Text3D:label1 = Create3DTextLabel("Soldaat der 2e klasse",GREEN, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label1, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) > 100 && GetPlayerScore(playerid) < 100)
    {
        new Text3D:label2 = Create3DTextLabel("Sergeant der 1e klasse",GREEN, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label2, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) > 200 && GetPlayerScore(playerid) < 200)
    {
        new Text3D:label3 = Create3DTextLabel("Korporaal",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label3, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) > 300 && GetPlayerScore(playerid) < 300)
    {
        new Text3D:label4 = Create3DTextLabel("Korporaal der 1e klasse",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label4, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) > 400 && GetPlayerScore(playerid) < 500)
    {
        new Text3D:label5 = Create3DTextLabel("Sergeant",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label5, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) > 500 && GetPlayerScore(playerid) < 600)
    {
        new Text3D:label6 = Create3DTextLabel("Sergeant der 1e klasse",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label6, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) >= 600)
    {
        new Text3D:label7 = Create3DTextLabel("Sergeant-Majoor",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label7, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) >= 700)
    {
        new Text3D:label7 = Create3DTextLabel("Adjudant",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label7, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) >= 800)
    {
        new Text3D:label7 = Create3DTextLabel("Vaandrig",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label7, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) >= 900)
    {
        new Text3D:label7 = Create3DTextLabel("Tweede-Luitenant",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label7, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) >= 1000)
    {
        new Text3D:label7 = Create3DTextLabel("Eerste-Luitenant",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label7, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) >= 1500)
    {
        new Text3D:label7 = Create3DTextLabel("Kapitein",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label7, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) >= 2000)
    {
        new Text3D:label7 = Create3DTextLabel("Majoor",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label7, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) >= 2500)
    {
        new Text3D:label7 = Create3DTextLabel("Luitenant-Kolonel",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label7, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) >= 3000)
    {
        new Text3D:label7 = Create3DTextLabel("Kolonel",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label7, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) >= 4000)
    {
        new Text3D:label7 = Create3DTextLabel("Brigade-Generaal",RED, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label7, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) >= 5000)
    {
        new Text3D:label7 = Create3DTextLabel("Generaal-Majoor",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label7, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) >= 6000)
    {
        new Text3D:label7 = Create3DTextLabel("Luitenant-Generaal",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label7, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) >= 8000)
    {
        new Text3D:label7 = Create3DTextLabel("Generaal",YELLOW, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label7, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) >= 10000)
    {
        new Text3D:label7 = Create3DTextLabel("Leger Baas",RED, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label7, playerid, 0.0, 0.0, 0.4);
    }
    return 1;
}



Re: Pawno crashes with rank system? - Mustafa6155 - 30.11.2012

OMG faisel thank you so much!

But me label dont work above me head?