Private skin problem -
DeeCaay - 10.07.2012
Код:
if(classid == 9)
{
GameTextForPlayer(playerid, "~g~[FYB]DoubleMac~n~", 3000, 5);
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
if(strcmp(name, "[FYB]DoubleMac") == 0)
SetPlayerHealth(playerid,100);
SetPlayerPos(playerid, 2178.6499,-1660.5642,14.9577);
SetPlayerCameraPos(playerid, 2182.1299,-1663.9437,14.8180);
SetPlayerCameraLookAt(playerid, 2178.6499,-1660.5642,14.9577);
{
SetPlayerHealth(playerid,0);
}
}
return 1;
}
Okay, my name is [FYB]DoubleMac.
Me and my friend testing private skin selection. So when i try to choose my own skin i die.
All i want is: When another player try to take this ClassID he's die.
Only [FYB] Doublemac can take it.
Re: Private skin problem -
coole210 - 10.07.2012
Why would you kill them? You could just send a message and return 0; so they don't even spawn. Btw, you have random braces in your code.
Is this even OnPlayerRequestSpawn? It looks like OnPlayerRequestClass, and if they request that class (just switch to it) they will die. You're missing braces for the name check as well. This whole thing is a mess.
Re: Private skin problem -
clarencecuzz - 10.07.2012
Try something like:
pawn Код:
public OnPlayerRequestSpawn(playerid)
{
if(GetPlayerSkin(playerid) == 0) //Change to your Skin ID
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
if(strcmp(name, "[FYB]DoubleMac", false) == 0)
{
SendClientMessage(playerid, 0x00FF00AA, "Welcome [FYB]DoubleMac!");
}
else {
GameTextForPlayer(playerid, "~g~[FYB]DoubleMac", 5000, 5);
SendClientMessage(playerid, 0xFF0000AA, "Only [FYB]DoubleMac can use this skin!");
return 0;
}
}
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
if(classid == 9)
{
GameTextForPlayer(playerid, "~g~[FYB]DoubleMac", 5000, 5);
}
return 1;
}
Re : Re: Private skin problem -
DeeCaay - 10.07.2012
Quote:
Originally Posted by clarencecuzz
Try something like:
pawn Код:
public OnPlayerRequestSpawn(playerid) { if(GetPlayerSkin(playerid) == 0) //Change to your Skin ID { new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, MAX_PLAYER_NAME); if(strcmp(name, "[FYB]DoubleMac", false) == 0) { SendClientMessage(playerid, 0x00FF00AA, "Welcome [FYB]DoubleMac!"); } else { GameTextForPlayer(playerid, "~g~[FYB]DoubleMac", 5000, 5); SendClientMessage(playerid, 0xFF0000AA, "Only [FYB]DoubleMac can use this skin!"); return 0; } } return 1; }
public OnPlayerRequestClass(playerid, classid) { if(classid == 9) { GameTextForPlayer(playerid, "~g~[FYB]DoubleMac", 5000, 5); } return 1; }
|
Worked, thanks.
Re: Private skin problem -
clarencecuzz - 10.07.2012
No Problem
Re: Private skin problem -
reh_007 - 10.07.2012
Nice .. That is easy, I guess. I could do that, in maybe 1 minute.
Re: Private skin problem -
clarencecuzz - 10.07.2012
You couldn't script shit Rehan.
Re: Private skin problem -
reh_007 - 10.07.2012
trol, I can script betah than u.
Re: Private skin problem -
clarencecuzz - 10.07.2012
STOP POSTING ON SOLVED THREADS!
You can't script an automatic gate system, you can't administrate a server for crap, you think you're a hacker but you're not, you're dissing everyone when you're the stupidest one in SAMP who probably couldn't even make a /heal command without having to copy something from the internet, you can't even speak English properly.
Re: Private skin problem -
reh_007 - 10.07.2012
Bro, I have a hole fucking forums, U think, I cant do shit, watch it, Go get ur son of a guns, and have a proper, Hacking match. Just watch u fucking cunt.