[Ajuda] public OnPlayerText - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] public OnPlayerText (
/showthread.php?tid=442253)
public OnPlayerText -
ThiagoMK - 06.06.2013
Como eu instalo essa public onplayertext?
Код:
if(text[0] == ';')
{
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
for(new i; i != MAX_PLAYERS; i++)
{
new Float[3];
GetPlayerPos(i,p[0],p[1],p[2]);
if(IsPlayerInRangeOfPoint(playerid,15.0,p[0],p[1],p[2]))
{
if(MSG[i] == false)
{
new sStr[256];
new Name[24];
GetPlayerName(playerid,Name,24);
format(sStr,128,"%s(%i): %s",Name,playerid,text[1]);
SendClientMessage(i,0x00FFFFAA,sStr);
PlayerPlaySound(i,1057,0.0,0.0,0.0);
MSG[i] = true;
}
MSG[i] = false;
return 0;
}
}
}
Re: public OnPlayerText -
n0minal - 06.06.2013
Код:
public OnPlayerText(playerid, text[])
{
if(text[0] == ';')
{
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
for(new i; i != MAX_PLAYERS; i++)
{
new Float[3];
GetPlayerPos(i,p[0],p[1],p[2]);
if(IsPlayerInRangeOfPoint(playerid,15.0,p[0],p[1],p[2]))
{
if(MSG[i] == false)
{
new sStr[256];
new Name[24];
GetPlayerName(playerid,Name,24);
format(sStr,128,"%s(%i): %s",Name,playerid,text[1]);
SendClientMessage(i,0x00FFFFAA,sStr);
PlayerPlaySound(i,1057,0.0,0.0,0.0);
MSG[i] = true;
}
MSG[i] = false;
return 0;
}
}
}
return 1;
}
1-1
Re: public OnPlayerText -
AlucardSnow - 06.06.2013
No seu GameMode.
OnPlayerText
Re : public OnPlayerText -
ThiagoMK - 06.06.2013
Vlw, por arrumar nominal, mais eu posso colocar ele em qualquer lugar do gamemode?
Re : public OnPlayerText -
ThiagoMK - 06.06.2013
Nominal eu coloquei esse codigo ae la no meio do gamemode e deu error :\