SA-MP Forums Archive
[Konstantino, I need you] - 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: [Konstantino, I need you] (/showthread.php?tid=472287)



[Konstantino, I need you] - Alex_Obando - 27.10.2013

Hello,

My somebody help me out?

When I connect if it detects my name and I chat
Change my name to Owner %s

Thanks.


Re: [Konstantino, I need you] - Tagathron - 27.10.2013

Use OnPlayerText()
Код:
OnPlayerText(playerid, text[])
{
   new PName[MAX_PLAYER_NAME];
   new string[128];
   GetPlayerName(playerid, PName, sizeof(PName));
   if(strcmp(PName, "YOUR NAME",true))
   {
       format(string, sizeof(string), "Owner %s says: %s", PName, text);
       SendClientMessageToAll(SOME COLOUR, string);
   }
   
   return 1;
}
EDIT:I think you should use strcmp(),did you test this code ig?



Respuesta: [Konstantino, I need you] - Alex_Obando - 27.10.2013

Oh, great thanks +1 Rep-


Re: [Konstantino, I need you] - doreto - 27.10.2013

Next time go and ask Konstantino!