SA-MP Forums Archive
Class(score req) - 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: Class(score req) (/showthread.php?tid=456858)



Class(score req) - SampzzonE - 07.08.2013

AddPlayerClass(105, 2495.3052,-1687.1858,13.5152, 269.1425, 25,200, 22, 250, 18, 2);//GROVE
AddPlayerClass(106, 2495.3052,-1687.1858,13.5152, 269.1425, 25, 200, 22, 250, 18, 2);//GROVE
AddPlayerClass(107, 2495.3052,-1687.1858,13.5152, 269.1425, 25, 200, 22, 250, 18, 2);//GROVE
AddPlayerClass(270, 2495.3052,-1687.1858,13.5152, 269.1425, 25, 200, 22, 250, 18, 2);//GROVE need 200 score
AddPlayerClass(102, 2168.3401,-1673.5699,15.0831, 269.1425, 25, 200, 22, 250, 18, 2);//BALLAS
AddPlayerClass(103, 2168.3401,-1673.5699,15.0831, 269.1425, 25, 200, 22, 250, 18, 2);//BALLAS
AddPlayerClass(104, 2168.3401,-1673.5699,15.0831, 269.1425, 25, 200, 22, 250, 18, 2);//BALLAS
AddPlayerClass(296, 2168.3401,-1673.5699,15.0831, 269.1425, 25, 200, 22, 250, 18, 2);//BALLAS need 200 score
AddPlayerClass(108, 2231.2822,-1159.2621,25.8342, 269.1425, 25, 200, 22, 250, 18, 2);//VAGOS
AddPlayerClass(109, 2231.2822,-1159.2621,25.8342, 269.1425, 25, 200, 22, 250, 18, 2);//VAGOS
AddPlayerClass(110, 2231.2822,-1159.2621,25.8342, 269.1425, 25, 200, 22, 250, 18, 2);//VAGOS
AddPlayerClass(30, 2231.2822,-1159.2621,25.8342, 269.1425, 25, 200, 22, 250, 18, 2);//VAGOS need 200 score
AddPlayerClass(114, 1685.1924,-2100.0193,13.8343, 269.1425, 25, 200, 22, 250, 18, 2);//AZTECAS
AddPlayerClass(115, 1685.1924,-2100.0193,13.8343, 269.1425, 25, 200, 22, 250, 18, 2);//AZTECAS
AddPlayerClass(116, 1685.1924,-2100.0193,13.8343, 269.1425, 25, 200, 22, 250, 18, 2);//AZTECAS
AddPlayerClass(292, 1685.1924,-2100.0193,13.8343, 269.1425, 25, 200, 22, 250, 18, 2);//AZTECAS need 200 score
AddPlayerClass(100, 681.7416,-473.8350,16.5363, 269.1425, 25, 200, 22, 250, 18, 2);//BIKER
AddPlayerClass(247, 681.7416,-473.8350,16.5363, 269.1425, 25, 200, 22, 250, 18, 2);//BIKER
AddPlayerClass(248, 681.7416,-473.8350,16.5363, 269.1425, 25, 200, 22, 250, 18, 2);//BIKER
AddPlayerClass(181, 681.7416,-473.8350,16.5363, 269.1425, 25, 200, 22, 250, 18, 2);//BIKER need 200 score
AddPlayerClass(118, 1257.6034,-784.9660,92.0302, 269.1425, 25, 200, 22, 250, 18, 2);//YAKUZA
AddPlayerClass(120, 1257.6034,-784.9660,92.0302, 269.1425, 25, 200, 22, 250, 18, 2);//YAKUZA
AddPlayerClass(228, 1257.6034,-784.9660,92.0302, 269.1425, 25, 200, 22, 250, 18, 2);//YAKUZA
AddPlayerClass(294, 1257.6034,-784.9660,92.0302, 269.1425, 25, 200, 22, 250, 18, 2);//YAKUZA need 200 score


(need 200 score to spawn with that skin)how to make it?


Re: Class(score req) - [XST]O_x - 07.08.2013

pawn Код:
public OnPlayerRequestSpawn(playerid)
{
    new s = GetPlayerSkin(playerid);
    switch (s) {
        case 270,296,30,292, 181, 294: if(GetPlayerScore(playerid) < 200) return SendClientMessage(playerid, -1, "ERROR: You need 200 score!");
    }
    return 1;
}
Or, even better:
pawn Код:
new allowedSkinScores[6][2] = {
{270, 200},
{296, 200},
{30, 200},
{292, 200},
{181, 200},
{294, 200}};

public OnPlayerRequestSpawn(playerid)
{
    for(new i = 0; i < sizeof allowedSkinScores; i++) {
        if( (GetPlayerSkin(playerid) == allowedSkinScores[i][0]) && (GetPlayerScore(playerid) < allowedSkinScores[i][1])) return SendClientMessage(playerid, -1, "ERROR: You need 200 score!");
    }
    return 1;
}
Just add skin ID's to the array if you want more skins. And you can change 200 to any other score you want.


Re: Class(score req) - SampzzonE - 07.08.2013

man.. but i can spawn with those skins