24.03.2011, 21:22
All is working fine but when i spawn my server doesnt show textdraws, cars and other, so it isn't in OnPlayerText but whatever here it is:
EDIT: OPSpawn:
pawn Код:
public OnPlayerText(playerid, text[])
{
new
string[128];
if(GetPVarInt(playerid, "Mute") == 1)
{
SendClientMessage(playerid, COLOR_RED, "[ERROR]: Ti si mute-ovan! Ne moћeљ govoriti.");
return false;
}
if(realchat)
{
if(GetPVarInt(playerid, "Accent") == 1)
{
format(string, sizeof(string), "%s kaћe: %s", GetName(playerid), text);
ProxDetector(playerid, string, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4);
return false;
}
else if(GetPVarInt(playerid, "Accent") == 2)
{
format(string, sizeof(string), "%s kaћe[Engleski]: %s", GetName(playerid), text);
ProxDetector(playerid, string, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4);
return false;
}
else if(GetPVarInt(playerid, "Accent") == 3)
{
format(string, sizeof(string), "%s kaћe[Ruski]: %s", GetName(playerid), text);
ProxDetector(playerid, string, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4);
return false;
}
else if(GetPVarInt(playerid, "Accent") == 4)
{
format(string, sizeof(string), "%s kaћe[Spanski]: %s", GetName(playerid), text);
ProxDetector(playerid, string, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4);
return false;
}
else if(GetPVarInt(playerid, "Accent") == 5)
{
format(string, sizeof(string), "%s kaћe[Mexicki]: %s", GetName(playerid), text);
ProxDetector(playerid, string, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4);
return false;
}
else if(GetPVarInt(playerid, "Accent") == 6)
{
format(string, sizeof(string), "%s kaћe[Americki]: %s", GetName(playerid), text);
ProxDetector(playerid, string, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4);
return false;
}
else if(GetPVarInt(playerid, "Accent") == 7)
{
format(string, sizeof(string), "%s kaћe[Gangsterski]: %s", GetName(playerid), text);
ProxDetector(playerid, string, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4);
return false;
}
else if(GetPVarInt(playerid, "Accent") == 8)
{
format(string, sizeof(string), "%s kaћe[Irski]: %s", GetName(playerid), text);
ProxDetector(playerid, string, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4);
return false;
}
else if(GetPVarInt(playerid, "Accent") == 9)
{
format(string, sizeof(string), "%s kaћe[Kolumbijski]: %s", GetName(playerid), text);
ProxDetector(playerid, string, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4);
return false;
}
else if(GetPVarInt(playerid, "Accent") == 10)
{
format(string, sizeof(string), "%s kaћe[Japanski]: %s", GetName(playerid), text);
ProxDetector(playerid, string, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4);
return false;
}
return false;
}
return true;
}
pawn Код:
public OnPlayerSpawn(playerid)
{
if(GetPVarInt(playerid, "Logged") == 0)
{
SendClientMessage(playerid, COLOR_RED, "[ERROR]:"#COL_WHITE"Prvo se moraљ ulogovati zatim onda spawnati!");
Kick(playerid);
}
else if(GetPVarInt(playerid, "Novi") == 1)
{
RandomSkin(playerid);
}
else
{
SetPlayerSkin(playerid, GetPVarInt(playerid, "Skin"));
AC_GivePlayerMoney(playerid, GetPVarInt(playerid, "Money"));
// Custom Hud //
TextDrawShowForPlayer(playerid, CustomHUD0[playerid]);
TextDrawShowForPlayer(playerid, CustomHUD1);
TextDrawShowForPlayer(playerid, CustomHUD2);
TextDrawShowForPlayer(playerid, CustomHUD3);
TextDrawShowForPlayer(playerid, CustomHUD4);
TextDrawShowForPlayer(playerid, CustomHUD5);
TextDrawShowForPlayer(playerid, CustomHUD6);
// Custom Hud //
TextDrawShowForPlayer(playerid, RandomPoruke0);
TextDrawShowForPlayer(playerid, RandomPoruke1);
TextDrawShowForPlayer(playerid, RandomPoruke2);
TextDrawShowForPlayer(playerid, RandomPoruke3);
TextDrawShowForPlayer(playerid, PravilaRP);
if(GetPVarInt(playerid, "House") > 0)
{
new
hID = GetPVarInt(playerid, "House");
SetPlayerPos(playerid, HouseInfo[hID][hExitX], HouseInfo[hID][hExitY], HouseInfo[hID][hExitZ]);
SetPlayerInterior(playerid, HouseInfo[hID][hInt]);
SetPlayerVirtualWorld(playerid, hID);
}
else if(GetPVarInt(playerid, "HRent") > 0)
{
new
hID = GetPVarInt(playerid, "HRent");
SetPlayerPos(playerid, HouseInfo[hID][hExitX], HouseInfo[hID][hExitY], HouseInfo[hID][hExitZ]);
SetPlayerInterior(playerid, HouseInfo[hID][hInt]);
SetPlayerVirtualWorld(playerid, hID);
}
}
return true;
}