Linux Server Crashes
#9

Quote:
Originally Posted by WarriorEd22
Посмотреть сообщение
Here it is:

pawn Код:
public OnPlayerSpawn(playerid)
{
    new rand = random(sizeof(RandomSpawn));
    // SetPlayerPos to the random spawn data
    SetPlayerPos(playerid, RandomSpawn[rand][0], RandomSpawn[rand][1],RandomSpawn[rand][2]);

    // SetPlayerFacingAngle to the random facing angle data
    SetPlayerFacingAngle(playerid, RandomSpawn[rand][3]);

    TextDrawShowForPlayer(playerid, TimeDisplay);
    new string[200]; new pname[24]; GetPlayerName(playerid, pname, 24);
    format(string, 200, "[SPAWN]%s (%d)", pname, playerid);
    SetPVarInt(playerid, "Spawned", 1);
    GivePlayerMoney(playerid, GetPVarInt(playerid, "Cash"));
    SetPVarInt(playerid, "Cash", 0);
    SetPlayerWantedLevel(playerid, GetPVarInt(playerid, "WantedLevel"));
    if(GetPVarInt(playerid, "Banned") == 1)
    SetPlayerWantedLevel(playerid, GetPVarInt(playerid, "WantedLevel"));
    SetPlayerToTeamColor(playerid);
    if(gTeam[playerid] == Team_Cop)
    {
        SendClientMessage(playerid, COLOR_DODGERBLUE, "**Law Enforcement**");
        SendClientMessage(playerid, COLOR_DODGERBLUE, "Type /commands for your available commands.");
        SendClientMessage(playerid, COLOR_DODGERBLUE, "Your job is to arrest wanted suspects in Los Santos and surrounding areas.");
        SendClientMessage(playerid, COLOR_DODGERBLUE, "Read /pc to find out which people you can and cannot shoot.");
        GivePlayerWeapon(playerid, 3, 1);
        GivePlayerWeapon(playerid, 23, 99999);
        GivePlayerWeapon(playerid, 29, 500);
        GivePlayerWeapon(playerid, 33, 10);
        SetPlayerArmour(playerid, 100.0);
        SetPVarInt(playerid, "CopRadio", 1);
        SetPlayerPos(playerid, 1569.5902,-1694.6520,5.8906);
        SetCameraBehindPlayer(playerid);
    }
    if(gTeam[playerid] == Team_FBI)
    {
        SendClientMessage(playerid, COLOR_DODGERBLUE, "**FBI Agent**");
        SendClientMessage(playerid, COLOR_DODGERBLUE, "Type /commands for your available commands.");
        SendClientMessage(playerid, COLOR_DODGERBLUE, "Your job is to arrest and catch criminals in Los Santos and nearby areas.");
        SendClientMessage(playerid, COLOR_DODGERBLUE, "Read /pc to find out which people you can and cannot shoot.");
        GivePlayerWeapon(playerid, 3, 1);
        GivePlayerWeapon(playerid, 22, 100);
        GivePlayerWeapon(playerid, 29, 500);
        GivePlayerWeapon(playerid, 31, 100);
        SetPlayerArmour(playerid, 100.0);
        SetPVarInt(playerid, "CopRadio", 1);
        SetPlayerPos(playerid, 1569.5902,-1694.6520,5.8906);
        SetCameraBehindPlayer(playerid);
    }
    if(gTeam[playerid] == Team_Army)
    {
        SendClientMessage(playerid, COLOR_PURPLE, "**Los Santos Army**");
        SendClientMessage(playerid, COLOR_PURPLE, "Type /commands for your commands");
        SendClientMessage(playerid, COLOR_PURPLE, "Your job is to take down MOST WANTED criminals by any means necessary.");
        SendClientMessage(playerid, COLOR_RED, "YOU CANNOT SHOOT AT OTHER ARMY, POLICE, OR NON MOST WANTED PLAYERS.");
        SendClientMessage(playerid, COLOR_PURPLE, "Read /pc to find out the player colors.");
        GivePlayerWeapon(playerid, 24, 50);
        GivePlayerWeapon(playerid, 31, 500);
        GivePlayerWeapon(playerid, 34, 20);
        GivePlayerWeapon(playerid, 26, 25);
        SetPlayerArmour(playerid, 100.0);
        SetPVarInt(playerid, "CopRadio", 1);
        SetPlayerPos(playerid,1767.4132,-2435.5422,13.5547);
        SetCameraBehindPlayer(playerid);
    }
    if(GetPVarInt(playerid, "JailTime") > 0)
    {
        new rnd = random(sizeof(PrisonSpawn)); SetPlayerPos(playerid, PrisonSpawn[rnd][0], PrisonSpawn[rnd][1], PrisonSpawn[rnd][2]);
        SetPlayerInterior(playerid, 10);
        format(string, sizeof(string), "[AUTO JAIL] %s (%d) (LEFT SERVER WHILE IN JAIL)", pname, playerid);
        SendClientMessageToAll(COLOR_RED, string);
        SetPVarInt(playerid, "Jailed", 1);
        SetPlayerWantedLevel(playerid, 0);
    }
    SetTimer("SetPlayerTeamFromNoTeam", 1000*15, 0);
    ContinueTaser[playerid] = 0;
    return 1;
}
The code seems to be right :/
idk what is making your error.
Reply


Messages In This Thread
closed. :) - by WarriorEd22 - 21.04.2012, 17:54
Re: Linux Server Crashes - by ColorHost-Kevin - 21.04.2012, 18:57
Re: Linux Server Crashes - by WarriorEd22 - 21.04.2012, 19:17
Re: Linux Server Crashes - by ColorHost-Kevin - 21.04.2012, 19:19
Re: Linux Server Crashes - by WarriorEd22 - 21.04.2012, 19:41
Re: Linux Server Crashes - by ColorHost-Kevin - 21.04.2012, 19:42
Re: Linux Server Crashes - by kikito - 21.04.2012, 20:25
Re: Linux Server Crashes - by WarriorEd22 - 21.04.2012, 20:52
Re: Linux Server Crashes - by kikito - 21.04.2012, 22:05

Forum Jump:


Users browsing this thread: 3 Guest(s)