[HELP] Re-set players name when Disconnect - 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: [HELP] Re-set players name when Disconnect (
/showthread.php?tid=94129)
[HELP] Re-set players name when Disconnect -
fishnutslol - 28.08.2009
ive got code that adds a tag to a players name (thanks WrathOfGenesis), but when my game mode re-starts the tag stays there and causes players to have multiple tags...
any way i can put something in OnPlayerDisconnect to disconnect the player completely then re-join or something so their name re-sets?
Re: [HELP] Re-set players name when Disconnect -
dice7 - 28.08.2009
Loop through players in OnGameModeExit
Re: [HELP] Re-set players name when Disconnect -
jerbob1992 - 28.08.2009
Can you post your tagscript?
I tink its something like
OnPlayerDisconnect(playerid)
{
playertag[playerid] = "";
}
Re: [HELP] Re-set players name when Disconnect -
fishnutslol - 29.08.2009
um ok the script is:
Код:
stock GivePlayerTag ( playerid , tag [ ] )
{
new name [ MAX_PLAYER_NAME ];
new newname [ 30 ];
GetPlayerName ( playerid , name , MAX_PLAYER_NAME );
format ( newname , sizeof ( newname ) , "[%s]%s" , tag , name );
SetPlayerName ( playerid , newname );
return 1;
}
public OnPlayerSpawn(playerid)
{
// First we need to see what classid a player got
switch(gClass[playerid])
{
case 0,1,2,3,4,5,6,7,8,9,10:
{
SetPlayerColor(playerid, 0xFF6600AA); // Orange
GivePlayerTag ( playerid , "THIS" );
}
case 11,12,13,14,15,16,17,18,19,20,21,22:
{
SetPlayerColor(playerid, 0xFF0000AA); // Red
GivePlayerTag ( playerid , "IS" );
}
case 23,24,25,26,27,28,29,30,31:
{
SetPlayerColor(playerid, 0x0066FFAA); // blue
GivePlayerTag ( playerid , "RANDOM" );
}
}
return 1;
}
i changed the tag names cause i dont want to give them away... um...
anyway...
ill try that.
Re: [HELP] Re-set players name when Disconnect -
fishnutslol - 30.08.2009
=(
didnt work...
maybe wrong spelling?
idk