01.10.2011, 22:00
Anyone knows whats wrong?
I dont get any errors in server_log to.
Tell me when you need to see something or so...
I dont get any errors in server_log to.
Tell me when you need to see something or so...
public OnPlayerText(playerid, text[])
{
new str[128];
if(PlayerStat[playerid][Logged] == 0)
{
SendClientMessage(playerid, GREY, "You must be logged in.");
return 0;
}
if(Server[CurrentGMX] >= 1)
{
SendClientMessage(playerid, GREY, "Please wait untill the server has fully restarted.");
return 0;
}
if(PlayerStat[playerid][FullyRegistered] == 0)
{
SendClientMessage(playerid, GREY, "You must enter your character information to chat.");
return 0;
}
if(PlayerStat[playerid][Spawned] == 0)
{
SendClientMessage(playerid, GREY, "You must be spawned to chat.");
return 0;
}
if(PlayerStat[playerid][Muted] == 1)
{
format(str, sizeof(str), "You can't chat while you're muted, you must wait %d seconds.", PlayerStat[playerid][MuteTime]);
SendClientMessage(playerid, GREY, str);
return 0;
}
else
{
format(str, sizeof(str), "%s says [%s Accent]: %s", GetICName(playerid), PlayerStat[playerid][Accent], text);
SendNearByMessage(playerid, WHITE, str, 5);
ICLog(str);
new Length = strlen(text);
new TalkTime = Length*100;
ApplyAnimation(playerid,"PED","IDLE_chat", 4.1, 0, 1, 1, 0, TalkTime);
KillTimer(Server[StopTalkingAnimation]);
Server[StopTalkingAnimation] = SetTimerEx("StopTalkingAnim", TalkTime, 0, "d", playerid);
}
return 0;
}
public StopTalkingAnim(playerid)
{
StopLoopingAnimation(playerid);
return 1;
}
public OnPlayerCommandReceived(playerid, cmdtext[])
{
if(PlayerStat[playerid][Logged] == 0)
{
SendClientMessage(playerid, GREY, "You must be logged in.");
return 0;
}
if(Server[CurrentGMX] >= 1)
{
SendClientMessage(playerid, GREY, "Please wait untill the server has fully restarted.");
return 0;
}
if(PlayerStat[playerid][FullyRegistered] == 0)
{
SendClientMessage(playerid, GREY, "You must enter your character information before using commands.");
return 0;
}
if(PlayerStat[playerid][Spawned] == 0)
{
SendClientMessage(playerid, GREY, "You must be spawned.");
return 0;
}
if(PlayerStat[playerid][Muted] == 1)
{
new str[128];
format(str, sizeof(str), "You can't use commands while you're muted, you must wait %d seconds.", PlayerStat[playerid][MuteTime]);
SendClientMessage(playerid, GREY, str);
return 0;
}
else return 1;
}
format(string, size,"%s Says: %s %s",Name, result);
public OnPlayerText(playerid, text[])
{
if (!text [0])
return 0;
new str[128];
if(PlayerStat[playerid][Logged] == 0)
{
SendClientMessage(playerid, GREY, "You must be logged in.");
return 0;
}
if(Server[CurrentGMX] >= 1)
{
SendClientMessage(playerid, GREY, "Please wait untill the server has fully restarted.");
return 0;
}
if(PlayerStat[playerid][FullyRegistered] == 0)
{
SendClientMessage(playerid, GREY, "You must enter your character information to chat.");
return 0;
}
if(PlayerStat[playerid][Spawned] == 0)
{
SendClientMessage(playerid, GREY, "You must be spawned to chat.");
return 0;
}
if(PlayerStat[playerid][Muted] == 1)
{
format(str, sizeof(str), "You can't chat while you're muted, you must wait %d seconds.", PlayerStat[playerid][MuteTime]);
SendClientMessage(playerid, GREY, str);
return 0;
}
else
{
format(str, sizeof(str), "%s says [%s Accent]: %s", GetICName(playerid), PlayerStat[playerid][Accent], text);
SendNearByMessage(playerid, WHITE, str, 5);
ICLog(str);
new Length = strlen(text);
new TalkTime = Length*100;
ApplyAnimation(playerid,"PED","IDLE_chat", 4.1, 0, 1, 1, 0, TalkTime);
KillTimer(Server[StopTalkingAnimation]);
Server[StopTalkingAnimation] = SetTimerEx("StopTalkingAnim", TalkTime, 0, "d", playerid);
}
return 0;
}