25.06.2011, 14:48
Hmm, please gave a credits for who made this tutorial:
Also, I don't see any point why do you add "playerid" at this callback,
You didn't used playerid there
pawn Code:
public OnPlayerText(playerid, text[]) // This callback is called when the players are chatting, we will change this from normal chat to our ProxDetector :)
{
new pname[24], str[128]; // the new for the name and string the player will say
GetPlayerName(playerid, pname, 24); // Gets the name so that it displays a name and not an ID
format(str, sizeof(str), "%s Says: %s", pname, text); // The actual text, formatted into a string
ProxDetector(10.0, playerid, str, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5); // Now this is where the fun begins. 10 means the radius, playerid is, well the playerid xD, str is your string and the colors are the colors you would like to have. You can change it!
return 0; //IMPORTANT! always use return 0; otherwise it will display both normal chat AND the ProxDetector
}
pawn Code:
public payday(playerid)
{
for(new i=0;i < MAX_PLAYERS; i++)
{
GivePlayerMoney(i,150);
}
SendClientMessageToAll(COLOR_GREEN,"You have recieved Government Welfare Check , You Recieved $150");
return 1;
}

