Quote:
Whenever you're feeling down, desperate, just remember you were the fastest sperm! wtf leingod |
your life now because you're the fastest sperm from your dad LOL
|
your life now because you're the fastest sperm from your dad LOL
|
public OnPlayerUpdate(playerid)
{
new Float:Health;
GetPlayerHealth(playerid, Health);
if(Health < 1) return SpawnPlayer(playerid);
return 1;
}
SetPlayerHealth(playerid,99999);
SetPlayerHealth(playerid,64000);
Okay, just what the fuck?
On Topic: Could you please show us your "OnPlayerUpdate"? Bug there could kill you, as its called almost 80 times in a second. |
public OnPlayerUpdate(playerid)
{
Streamer_Update(playerid);
return 1;
}
pawn Code:
EDIT: I thought it was a death bug sorry! |
Try changing
Code:
SetPlayerHealth(playerid,99999); Code:
SetPlayerHealth(playerid,64000); Wiki: Integer Overflow |
Under OnPlayerUpdate there is actually nothing just this:
pawn Code:
This is just the same x), After i die i spawn .. Ok going to try .. |
If it doesn't work, try commenting out that line and see if that resolves the issue. If it does, just try a lower number still, perhaps 32000.
|
Nope don't work, i commented that line (SetPlayerHealth()) and edited to a lower health (500) But still i die :-/
|
Then the issue is not there, try running a search for SetPlayerHealth in your script.
|
show me your /afk, /brb, /back, and OnPlayerConnect & OnPlayerSpawn
|
CMD:afk(playerid, params[])
{
new reason[256];
GetPlayerName(playerid, pName,MAX_PLAYER_NAME);
if(!sscanf(params,"s[256]",reason)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /afk [reason]");
format(string, sizeof(string), "%s is now AFK (Away From Keyboard) [ %s ]", pName,reason);
SendClientMessageToAll(COLOR_YELLOW, string);
TogglePlayerControllable(playerid, 0);
SetPlayerHealth(playerid, 99999999.99);
return 1;
}
CMD:back(playerid, params[])
{
GetPlayerName(playerid, pName,MAX_PLAYER_NAME);
format(string, sizeof(string), "%s is back in game !", pName);
SendClientMessageToAll(COLOR_YELLOW, string);
TogglePlayerControllable(playerid, 1);
SetPlayerHealth(playerid, 100);
return 1;
}
CMD:brb(playerid, params[])
{
new reason[256];
GetPlayerName(playerid, pName,MAX_PLAYER_NAME);
if(sscanf(params,"%s[256]",reason)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /brb [reason]");
format(string, sizeof(string), "%s is gonna be right back ! [ %s ]", pName, reason);
SendClientMessageToAll(COLOR_YELLOW, string);
TogglePlayerControllable(playerid, 0);
SetPlayerHealth(playerid, 99999999.99);
return 1;
}
public OnPlayerConnect(playerid)
{
S_OnPlayerConnect(playerid);
SetPVarInt(playerid, "ConnectTime", GetTickCount());
TextDrawShowForPlayer(playerid, Textdraw0);
GetPlayerName(playerid,pName,32);
format(string,sizeof string,"%s joined the server. [Ping: %i]",pName,GetPlayerPing(playerid));
SendClientMessageToAll(COLOR_BROWN,string);
SendDeathMessage(playerid, playerid, 200);
gActivePlayers[playerid]++;
/*-*/if(IsPlayerNPC(playerid)) { return 1; }
SetTimerEx("Record", 5000, false, "d", playerid);
SendClientMessage(playerid, COLOR_WHITE, "-----------------------------------WELCOME---------------------------------------------------------------------------");
SendClientMessage(playerid, COLOR_YELLOW, "Welcome to PAT (Police and Terrorist) server!");
SendClientMessage(playerid, COLOR_PURPLE, "READ IMORTANT SUBJECTS: /rules ** /cmds ** /info ** /pc");
SendClientMessage(playerid, COLOR_PURPLE, "Rcon admin: Michael@Belgium");
SendClientMessage(playerid, COLOR_WHITE, "---------------------------------------------------------------------------------------------------------------------");
GameTextForPlayer(playerid, " ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ Welcome to [MV] ~b~ Police~w~vs~r~ Terrorists !", 3000,6);
SetPlayerMapIcon(playerid, 1, -2624.0776,607.4563,14.4531, 22, 0,MAPICON_LOCAL);//map icon medic (hospital)
SetPlayerMapIcon(playerid, 2, -1615.5294,684.0948,7.1875, 30, 0, MAPICON_LOCAL);//map icon cop
SetPlayerMapIcon(playerid, 3, -2708.4341,376.0833,4.9697, 19, 0, MAPICON_LOCAL);//map icon terro
SetPlayerMapIcon(playerid, 4, -2623.4309,1404.5974,7.1016, 19, 0, MAPICON_LOCAL);//map icon mafia
SetPlayerMapIcon(playerid, 5, -1328.6627,437.6554,7.1809, 30, 0, MAPICON_LOCAL);
SetPlayerMapIcon(playerid, 6, -2037.3209,84.7853,45.3577, 20, 0, MAPICON_LOCAL);//map icon firemen
SetPlayerMapIcon(playerid, 7, -2554.6504,192.0514,6.1075, 48, 0, MAPICON_LOCAL);//Disco
SetPlayerMapIcon(playerid, 8, -2269.4568,-155.9554,35.3203,37,0,MAPICON_LOCAL);//duel
return 1;
}
public OnPlayerSpawn(playerid)
{
//S_OnPlayerSpawn(playerid);
new skin = GetPlayerSkin(playerid);
if(skin == 83 || skin == 165)
{
if (IsPlayerAdmin(playerid))
{
GivePlayerWeapon(playerid, 9,1);
GivePlayerWeapon(playerid, 18, 500);
GivePlayerWeapon(playerid, 26, 500);
GivePlayerWeapon(playerid, 31, 500);
GivePlayerWeapon(playerid, 32, 500);
GivePlayerWeapon(playerid, 36, 500);
GivePlayerWeapon(playerid, 37, 10000);
GivePlayerWeapon(playerid, 38, 10000);
SetPlayerColor(playerid, COLOR_ORANGE);
}
else
{
new pNAME[MAX_PLAYERS];
SendClientMessage(playerid, COLOR_RED,"***ONLY ADMINS MAY USE THIS SKIN, PLEASE CHOOSE AGAIN !***");
GameTextForPlayer(playerid,"~r~KICKED !",2500,0);
GetPlayerName(playerid,pNAME,32);
format(string,sizeof(string),"%s tried to get the rcon admin skin but he's BEEN KICKED !",pNAME);
SendClientMessageToAll(COLOR_RED,string);
Kick(playerid);
}
}
switch(gTeam[playerid])
{
case MEDIC:
{
SendClientMessage(playerid, COLOR_YELLOW, ">> You are a medic ! Heal other players before they die ! <<");
SendClientMessage(playerid, COLOR_YELLOW, ">> Read /duty and /mediccmds !");
SetPlayerColor(playerid, COLOR_YELLOW);
}
case FIREMEN:
{
SendClientMessage(playerid, COLOR_PINK,">> You are a fireman ! REMEMBER: THIS CLASS IS UNDER CONSTRUCTION !! << ");
SendClientMessage(playerid, COLOR_PINK,">> Read /duty and /firemencmds !");
SetPlayerColor(playerid, COLOR_PINK);
}
case POLICE:
{
SendClientMessage(playerid, COLOR_BLUE, ">> You are a cop ! Kill the terrorists/mafia and win points/money ! <<");
SendClientMessage(playerid, COLOR_BLUE, ">> Read /duty and /policecmds. <<");
SetPlayerColor(playerid, COLOR_BLUE);
}
case TERRORIST:
{
SendClientMessage(playerid, COLOR_RED, ">> You are a terrorist ! Kill the cops/army and win points/money ! <<");
SendClientMessage(playerid, COLOR_RED, ">> Read /duty and /terrocmds ! <<");
SetPlayerColor(playerid, COLOR_RED);
}
case MAFIA:
{
SendClientMessage(playerid,COLOR_GREEN,">> You are the mafia ! Kill the cops / army and win points/money ! <<");
SendClientMessage(playerid, COLOR_GREEN,">> Read /duty ! << ");
SetPlayerColor(playerid, COLOR_GREEN);
}
case ARMY:
{
SendClientMessage(playerid, COLOR_WHITE,">> You are the army ! Kill the terrorists/mafia and win points/money ! <<");
SendClientMessage(playerid, COLOR_WHITE,">> Read /duty and /armycmds ! <<");
SetPlayerColor(playerid, COLOR_WHITE);
}
}
//--------------------------------
SetPlayerHealth(playerid,99999);
format(str, sizeof(str), "You can't be killed for %d second(s) (spawn protection)", PROTECTIONTIME);
SendClientMessage(playerid, 0xFF0000AA, str);
label[playerid] = Create3DTextLabel("Anti-Spawnkill protected player",0xFF0000AA,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.7);
SetTimerEx("AntiSpawnkill",PROTECTIONTIME*1000,0,"d",playerid);
//--------------------------------
return 1;
}