Skin CJ 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Skin CJ system (
/showthread.php?tid=94108)
Skin CJ system -
Typhome - 28.08.2009
Код:
If(PlayerInfo[playerid][pChar] == 1||PlayerInfo[playerid][pChar] == 2||PlayerInfo[playerid][pChar] == 3||PlayerInfo[playerid][pChar] == 4)
{
SetPlayerSkin(playerid, 135);
PlayerInfo[playerid][pChar] = 135;
}
Is that correct? I want make it, if anyone have CJ skin then system will change player skin who have CJ skin.
Re: Skin CJ system -
dice7 - 28.08.2009
Isn't CJs skin ID 0 ?
Re: Skin CJ system -
Typhome - 28.08.2009
Quote:
Originally Posted by dice7
Isn't CJs skin ID 0 ?
|
Код:
If(PlayerInfo[playerid][pChar] == 0||PlayerInfo[playerid][pChar] == 1||PlayerInfo[playerid][pChar] == 2||PlayerInfo[playerid][pChar] == 3||PlayerInfo[playerid][pChar] == 4)
{
SetPlayerSkin(playerid, 135);
PlayerInfo[playerid][pChar] = 135;
}
Is That Correct? This work's ?
Re: Skin CJ system -
dice7 - 28.08.2009
I would still use native functions rather then my own variables to find the players skin, since they are the most accurate.
But your example would work
pawn Код:
public OnPlayerSpawn(playerid)
{
if(GetPlayerSkin(playerid) == 0)
{
SetPlayerSkin(playerid, 135);
PlayerInfo[playerid][pChar] = 135;
SendClientMessage(playerid, COLOR, "You can't use CJs skin. Changing to another one. Press F4 if you want to select a new skin");
}
}
Re: Skin CJ system -
Typhome - 28.08.2009
Quote:
Originally Posted by dice7
I would still use native functions rather then my own variables to find the players skin, since they are the most accurate.
But your example would work
pawn Код:
public OnPlayerSpawn(playerid) { if(GetPlayerSkin(playerid) == 0) { SetPlayerSkin(playerid, 135); PlayerInfo[playerid][pChar] = 135; SendClientMessage(playerid, COLOR, "You can't use CJs skin. Changing to another one. Press F4 if you want to select a new skin"); } }
|
Thanks, i test now.
// Tested, works. Thanks.