SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 01/10/2011, 10:00 PM   #1
Sensitive
Huge Clucker
 
Sensitive's Avatar
 
Join Date: Feb 2011
Location: LolIhavenoidea
Posts: 267
Reputation: 10
Default When someone types the server crashes

Anyone knows whats wrong?
I dont get any errors in server_log to.
Tell me when you need to see something or so...
__________________
Sensitive is offline   Reply With Quote
Old 01/10/2011, 10:08 PM   #2
henry jiggy
Big Clucker
 
henry jiggy's Avatar
 
Join Date: Jan 2011
Location: Brazil
Posts: 153
Reputation: 13
Default Re: When someone types the server crashes

Show us your OnPlayerText.











This forum requires that you wait 120 seconds between posts. Please try again in 86 seconds.


FUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU---------------
__________________

Home Server(clickey) back and regularly online, but most of the time not.
henry jiggy is offline   Reply With Quote
Old 01/10/2011, 10:24 PM   #3
Sensitive
Huge Clucker
 
Sensitive's Avatar
 
Join Date: Feb 2011
Location: LolIhavenoidea
Posts: 267
Reputation: 10
Default Re: When someone types the server crashes

pawn Code:
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;
}
__________________
Sensitive is offline   Reply With Quote
Old 01/10/2011, 10:39 PM   #4
henry jiggy
Big Clucker
 
henry jiggy's Avatar
 
Join Date: Jan 2011
Location: Brazil
Posts: 153
Reputation: 13
Default Re: When someone types the server crashes

Varies much i guess.... if ICLog write/reads from a file that could be causing the sevrer crashes...

also maybe ApplyAnimation(playerid,"PED","IDLE_chat", 4.1, 0, 1, 1, 0, TalkTime); has something invalid in it(btw i dont use animations so idk what is valid or not)...

SendNearByMessage could be causing it depending on how its coded there...

Server[StopTalkingAnimation]... hmmm....this sounds strange idk if its possible doing arrays with names(unless you define them or use ENUM)

StopLoopingAnimation could be causing it too depends...

your OnPlayerCommandReceived looks clean also idk why u posted it but ok...

i also see nothing wrong with the stuff before "else" on OnPlayerText, they see clean... i cant try it in my script because i dont have the functions, sry. cant help more
__________________

Home Server(clickey) back and regularly online, but most of the time not.
henry jiggy is offline   Reply With Quote
Old 01/10/2011, 10:56 PM   #5
Sensitive
Huge Clucker
 
Sensitive's Avatar
 
Join Date: Feb 2011
Location: LolIhavenoidea
Posts: 267
Reputation: 10
Default Re: When someone types the server crashes

Anyone else?
__________________
Sensitive is offline   Reply With Quote
Old 02/10/2011, 08:24 AM   #6
Sensitive
Huge Clucker
 
Sensitive's Avatar
 
Join Date: Feb 2011
Location: LolIhavenoidea
Posts: 267
Reputation: 10
Default Re: When someone types the server crashes

Help?
__________________
Sensitive is offline   Reply With Quote
Old 02/10/2011, 08:26 AM   #7
Pharrel
High-roller
 
Pharrel's Avatar
 
Join Date: Feb 2011
Location: Brazil
Posts: 1,530
Reputation: 135
Default Re: When someone types the server crashes

you must have a %s with no reference...

like

pawn Code:
format(string, size,"%s Says: %s %s",Name, result);

sometimes this shut the server down...(it happens with me)
__________________

"Afirmo que ambos somos ateus. Apenas acredito num deus a menos que você.
Quando você entender porque é que rejeita todos os outros deuses possíveis,
entenderá porque é que eu rejeito o seu."
Stephen Henry Roberts
Pharrel is offline   Reply With Quote
Old 02/10/2011, 08:29 AM   #8
Sensitive
Huge Clucker
 
Sensitive's Avatar
 
Join Date: Feb 2011
Location: LolIhavenoidea
Posts: 267
Reputation: 10
Default Re: When someone types the server crashes

I dont get it... ?
Where do i put that thing then?
__________________
Sensitive is offline   Reply With Quote
Old 02/10/2011, 08:39 AM   #9
Sensitive
Huge Clucker
 
Sensitive's Avatar
 
Join Date: Feb 2011
Location: LolIhavenoidea
Posts: 267
Reputation: 10
Default Re: When someone types the server crashes

I really need some help. Anyone?
__________________
Sensitive is offline   Reply With Quote
Old 02/10/2011, 08:41 AM   #10
Double-O-Seven
Guest
 
Posts: n/a
Default Re: When someone types the server crashes

pawn Code:
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;
}
  Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Server types *IsBack General 6 29/04/2011 08:40 PM
Server ranting, Share the types you like/dislike and why! -Rebel Son- Everything and Nothing 23 20/01/2011 04:25 AM
Can some on explain the server types DeeBalee General 6 18/10/2009 03:20 PM
SA-MP - All IDs and Types! LuxurioN™ Help Archive 15 08/10/2009 07:02 PM


All times are GMT. The time now is 06:27 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.