Name To All - 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: Name To All (
/showthread.php?tid=141317)
Name To All -
JustinB - 12.04.2010
How would I make it so if like [Owner]Charlie spawns it will show it on everybody's screen (not textdraw) so like.
[Owner]Charlie Has Spawned!
Re: Name To All -
johnnyc - 12.04.2010
you mean to send the message to all the players, if yes just edit your script to: SendClientMessageToAll
Re: Name To All -
sjvt - 12.04.2010
pawn Код:
public OnPlayerSpawn(playerid)
{
new string[128];
format(string, sizeof(string), "%s Has been Spawned!", PlayerName[playerid]);
SendClientMessageToAll(0x33CCFFAA, string);
return 1;
}
0x33CCFFAA = Lightblue
-UPDATE
i forget PlayerName[playerid] ^^,
Re: Name To All -
aircombat - 12.04.2010
add this (tested) : (under OnPlayerSpawn)
Код:
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
if(strcmp(name, "[Owner]Charlie") == 0)
{
SendClientMessage(playerid,COLOR_YELLOW,"[Owner]Charlie");
}
Re: Name To All -
JustinB - 12.04.2010
thx guys it worked
Re: Name To All -
sjvt - 12.04.2010
Quote:
Originally Posted by Etch ❽ H
add this (tested) : (under OnPlayerSpawn)
Код:
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
if(strcmp(name, "[Owner]Charlie") == 0)
{
SendClientMessage(playerid,COLOR_YELLOW,"[Owner]Charlie");
}
|
pawn Код:
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
if(strcmp(name, "[Owner]Charlie") == 0)
{
SendClientMessage(playerid,COLOR_YELLOW,"[Owner]Charlie Is Spawned");
}
and use SendClientMessageToAll, now you see it alone ^^
its better if you see it by all so
Код:
Silox has been spawned
or
Код:
Monkey has been spawned
not only you ^^
--
pawn Код:
public OnPlayerSpawn(playerid)
{
new string[128];
format(string, sizeof(string), "%s Has been Spawned!", PlayerName[playerid]);
SendClientMessageToAll(0x33CCFFAA, string);
return 1;
}
Re: Name To All -
aircombat - 12.04.2010
dude he doesn't need the string he just need it for his name :S
Re: Name To All -
JustinB - 12.04.2010
Ok So It works fine But how Do I make itso It only says It when I request a Class? Because everytime a die and respawn it pops up
Re: Name To All -
Naxix - 13.04.2010
Put it under OnPlayerConnect?
Re: Name To All -
[MWR]Blood - 13.04.2010
Oh, here's the code.Put it after OnPlayerSpawn(playerid)
pawn Код:
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
if(strcmp(name, "[Owner]Charlie") == 0)
{
SendClientMessageToAll(COLOR_YELLOW,"[Owner]Charlie Has Spawned!");
return 1;
}