SA-MP Forums Archive
Anti CJ skin? - 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: Anti CJ skin? (/showthread.php?tid=424518)



Anti CJ skin? - ThaCrypte - 22.03.2013

Hi, i want to disable all CJ skins in my samp server, to raise the roleplay level.
Yet when people just created their account, they spawn with a CJ skin and i dont know how to change it and where it stands.
I dont want to /setskin to everyone, so yeah.


Re: Anti CJ skin? - dusk - 22.03.2013

Well,if you let them choose,search for AddPlayerClass.You will find the spawn coordinates in it aswell.

For the other thing. Just set a default skin when they register.

What do you mean by this:
I dont want to /setskin to everyone, so yeah.


Re: Anti CJ skin? - Baboon - 22.03.2013

SetPlayerSkin(playerid, skinid); on OnPlayerSpawn
look on the wiki for skins


Re: Anti CJ skin? - RajatPawar - 22.03.2013

Under OnGameModeInIt, remove the line saying AddPlayerClass(0, ... ); and if there's none, there's some serious bugs with your script.


Re: Anti CJ skin? - Scenario - 22.03.2013

You can run code under OnPlayerSpawn to determine if the player has skin ID 0 (CJ skin). If they do, give them a random skin. Generally skins 1-299 (excluding 74- it's invalid) are used.


Re: Anti CJ skin? - PaulDinam - 22.03.2013

right after they create the account..
set their skin..


Re: Anti CJ skin? - ThaCrypte - 22.03.2013

@pauldinam, not funny xD
For the others:
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
I just change the 0 to a 1? like this?
AddPlayerClass(1, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);

Also, dont i need to prevent people to do /clothes 0?


// ThaCrypte


Re: Anti CJ skin? - Windrush - 22.03.2013

Try This
pawn Код:
public OnPlayerUpdate(playerid)
{
    if(GetPlayerSkin(playerid) == 0)
    {
        SetPlayerSkin(playerid, 299)
        return 1;
    }
    return 1;
}



Re: Anti CJ skin? - ThaCrypte - 22.03.2013

Quote:
Originally Posted by windrush
Посмотреть сообщение
Try This
pawn Код:
public OnPlayerUpdate(playerid)
{
    if(GetPlayerSkin(playerid) == 0)
    {
        SetPlayerSkin(playerid, 299)
        return 1;
    }
    return 1;
}
C:\Users\admin\Desktop\LSC-RP\gamemodes\LSC-RP.pwn(3329) : error 001: expected token: ";", but found "return"
C:\Users\admin\Desktop\LSC-RP\gamemodes\LSC-RP.pwn(2472 : error 021: symbol already defined: "RL_OnPlayerUpdate"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


Re: Anti CJ skin? - Windrush - 23.03.2013

Quote:
Originally Posted by ThaCrypte
Посмотреть сообщение
C:\Users\admin\Desktop\LSC-RP\gamemodes\LSC-RP.pwn(3329) : error 001: expected token: ";", but found "return"
C:\Users\admin\Desktop\LSC-RP\gamemodes\LSC-RP.pwn(2472 : error 021: symbol already defined: "RL_OnPlayerUpdate"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
pawn Код:
public OnPlayerUpdate(playerid)
{
    if(GetPlayerSkin(playerid) == 0)
    {
        SetPlayerSkin(playerid, 299);
        return 1;
    }
    return 1;
}