[REQ]Example script. - 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: [REQ]Example script. (
/showthread.php?tid=349293)
[REQ]Example script. -
TheBluec0de - 08.06.2012
system worlds, by command, with a limit, you should receive only the messages of the world where you are.
example please
![Huh?](images/smilies/confused.gif)
??
AW: [REQ]Example script. -
Tigerkiller - 08.06.2012
pawn Код:
new Worlds[MAX_PLAYERS]; // Global Var
//Reset it on Discconect / Connect
//OnPlayerText Code:
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i)) continue;
{
if(GetPlayerVirtualWorld(i) == GetPlayerVirtualWorld(playerid))
{
SendClientMessage(i, 0xFF0000FF, text);
return 0;
}
return 0;
}
}
Just set the Worlds veriable in your Command
Have a nice Day!
Re: AW: [REQ]Example script. -
TheBluec0de - 08.06.2012
Quote:
Originally Posted by Tigerkiller
pawn Код:
new Worlds[MAX_PLAYERS]; // Global Var //Reset it on Discconect / Connect
//OnPlayerText Code: for(new i = 0; i < MAX_PLAYERS; i++) { if(!IsPlayerConnected(i)) continue; { if(GetPlayerVirtualWorld(i) == GetPlayerVirtualWorld(playerid)) { SendClientMessage(i, 0xFF0000FF, text); return 0; } return 0; } }
Just set the Worlds veriable in your Command
Have a nice Day!
|
thanks, example command ?
Re: [REQ]Example script. -
TheBluec0de - 08.06.2012
anyone help ?
Re: [REQ]Example script. -
Niko_boy - 08.06.2012
pawn Код:
new Worlds[MAX_PLAYERS]; // Global Var
//Reset it on Discconect / Connect
public OnPlayerText(playerid, text[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i)) continue;
{
if(GetPlayerVirtualWorld(i) == GetPlayerVirtualWorld(playerid))
{
SendClientMessage(i, 0xFF0000FF, text);
return 0;
}
return 0;
}
}
return 1;
}
Nothing was hard in it =___=
the above guy mentioned it perfectly though
Re: [REQ]Example script. -
TheBluec0de - 08.06.2012
Quote:
Originally Posted by Niko_boy
pawn Код:
new Worlds[MAX_PLAYERS]; // Global Var //Reset it on Discconect / Connect
public OnPlayerText(playerid, text[]) { for(new i = 0; i < MAX_PLAYERS; i++) { if(!IsPlayerConnected(i)) continue; { if(GetPlayerVirtualWorld(i) == GetPlayerVirtualWorld(playerid)) { SendClientMessage(i, 0xFF0000FF, text); return 0; } return 0; } } return 1; }
Nothing was hard in it =___=
the above guy mentioned it perfectly though
|
I answer, how to create the command, use zcmd + sscanf.
but solved, thanks all.