This script isnt working :S - 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: This script isnt working :S (
/showthread.php?tid=371079)
This script isnt working :S -
[LSG]Lil_Familie - 22.08.2012
i used this to lock my skin i made a "new myskin[1];
and putted "myskin[0]=" infront of the Addplayerclass and i used this to stop people from using it and this code isnt working i did it kinda same with my car.
Код:
for(new i=0; i<sizeof(myskin); i++)
{
if(GetPlayerSkin(playerid)==myskin[i])
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
if(!strcmp(name,"[KTB]Lil_Fam[PNR]",true) == 0)
{
SetPlayerHealth(playerid,0);
SendClientMessage(playerid,COLOR_RED,"You are not [KTB]Lil_Fam[PNR]");
}
}
}
Re: This script isnt working :S -
[MM]RoXoR[FS] - 22.08.2012
If this is just for one player, you dont need any array and a loop
pawn Код:
new myskin = 0;//Assuming myskin is of CJ
//Wherever you want to put it
if(GetPlayerSkin(playerid) == myskin)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
if(!strcmp(name,"[KTB]Lil_Fam[PNR]",true) == 0)
{
SetPlayerHealth(playerid,0);
SendClientMessage(playerid,COLOR_RED,"You are not [KTB]Lil_Fam[PNR]");
}
}
AW: This script isnt working :S -
[LSG]Lil_Familie - 22.08.2012
ok now i did it like that but if i pick the skin i locked i still can spawn even if im using another name