text problem - 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: text problem (
/showthread.php?tid=111931)
text problem -
p00p - 04.12.2009
I found a little problem for me on my server. When a player isnt admin, if he sends a message only he sees it. If a player is an admin its fine, i'm using SeifAdmin but its a little bit modified (i am using a code to make admins talk a different color)
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[128];
new tmp[128];
new idx; if(AccountInfo[playerid][AdminLevel] >= 1)
{
GetPlayerName(playerid,name,sizeof name);
format(txt,512,"%s: %s",name,text);
SendClientMessageToAll(GREEN,txt);
return 0;
}
here's the thing that happens
Heres what happens without admin:
It goes as >> Message
__________________________________________________ _________________
Heres what happens with admin:
It's fine with admin.
__________________________________________________ _________________
I get the same error with PMs, but this happens with or without admin:
Re: text problem -
p00p - 04.12.2009
Any help ?
Re: text problem -
Backwardsman97 - 04.12.2009
What's your whole OnPlayerText?
Re: text problem -
p00p - 04.12.2009
Ehm,
Код:
public OnPlayerText(playerid, text[])
{
new txt[512];
new name[MAX_PLAYER_NAME];
if(question[playerid] == 1)
{
if(strcmp(text, "accept", true) == 0)
{
new Float:x,Float:y,Float:z;
GetPlayerPos(getid[playerid],x,y,z);
SetPlayerPos(playerid,x+2,y+2,z);
question[playerid] = 0;
return 0;
}
if(strcmp(text, "deny", true) == 0)
{
SendClientMessage(getid[playerid],ORANGE,"The Player denied to come.");
question[playerid] = 0;
return 0;
}
else
SendClientMessage(playerid,ORANGE,"Type accept or deny!");
return 0;
}
else
if(AccountInfo[playerid][AdminLevel] >= 1)
{
GetPlayerName(playerid,name,sizeof name);
format(txt,512,"%s: %s",name,text);
SendClientMessageToAll(GREEN,txt);
return 0;
}
if(AFKCheck[playerid] >= AFK_TIME)
OnPlayerBackOfAFK(playerid);
AFKCheck[ playerid ] = 0;
if(AccountInfo[playerid][Logged] == 0)
{
SendClientMessage(playerid,RED,"You need to be logged in to talk.");
return 0;
}
else
if (AccountInfo[playerid][Mute] == 1)
{
SendClientMessage(playerid, RED, "You are muted! You cannot talk.");
return 0;
}
return 1;
}
Re: text problem -
p00p - 04.12.2009
any ideas ? :[
Re: text problem -
p00p - 05.12.2009
sorry for the bump, Please help
Re: text problem -
p00p - 05.12.2009
hello ?
Re: text problem -
p00p - 05.12.2009
please
Re: text problem -
Badger(new) - 05.12.2009
This is wrong
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[128];
new tmp[128];
new idx; if(AccountInfo[playerid][AdminLevel] >= 1)
{
GetPlayerName(playerid,name,sizeof name);
format(txt,512,"%s: %s",name,text);
SendClientMessageToAll(GREEN,txt);
return 0;
}
Why is it under OnPlayerCommandText?
Re: text problem -
p00p - 05.12.2009
Quote:
Originally Posted by -The_Badger-
This is wrong
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[]) { new cmd[128]; new tmp[128]; new idx; if(AccountInfo[playerid][AdminLevel] >= 1) { GetPlayerName(playerid,name,sizeof name); format(txt,512,"%s: %s",name,text); SendClientMessageToAll(GREEN,txt); return 0; }
Why is it under OnPlayerCommandText?
|
i dunno so i move it to onplayertext?