How do I fix this? - 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: How do I fix this? (
/showthread.php?tid=224896)
How do I fix this? -
Beginnercoder - 12.02.2011
Hi I have made all my police 10 codes but when you type the code in, in-game it doesn't say who said it because I havn't added it but I don't know what to put.
Here is a small example of what I have done so far.
pawn Код:
public OnPlayerText(playerid, text[])
{
if(!strcmp(text, "10-0", true))
{
SendClientMessageToAll(0xFF0000FF, "CAUTION");
return 0;
}
if(!strcmp(text, "10-1", true))
{
SendClientMessageToAll(0xFF0000FF, "Signal Weak");
return 0;
}
Re: How do I fix this? -
Medal Of Honor team - 12.02.2011
pawn Код:
public OnPlayerText(playerid, text[])
{
new Name[MAX_PLAYER_NAME];
GetPlayerName(playerid, Name, sizeof(Name));
new string[128];
if(!strcmp(text, "10-0", true))
{
format(string, sizeof(string), "Be Cautiom %s ", Name );
SendClientMessageToAll(0xFF0000FF, string);
return 0;
}
if(!strcmp(text, "10-1", true))
{
format(string, sizeof(string), "Single Weak %s ", Name );
SendClientMessageToAll(0xFF0000FF, string);
return 0;
}
}
Re: How do I fix this? -
Beginnercoder - 12.02.2011
Ok I put that code in but I get this warning
Код:
warning 217: loose indentation