[HELP]AntiPG system
#1

Look,i made AntiPG system for GodFather script,but main part of script doesn't work...I don't know where is the problem:
Код:
new gInjured[MAX_PLAYERS];
new gKilled[MAX_PLAYERS];

enum pPort
{
	Float:pPortx,
	Float:pPorty,
	Float:pPortz,
};
new PlayerPort[MAX_PLAYERS][pPort];

//on SetPlayerSpawn
if(gKilled[playerid] == 1)
		{
		  SetPlayerPos(playerid, PlayerPort[playerid][pPortx], PlayerPort[playerid][pPorty], PlayerPort[playerid][pPortz]);
	  	SendClientMessage(playerid, COLOR_LIGHTRED, "** Vraćeni ste lokaciju na kojoj ste ubijeni radi RP-a **");
	  	SendClientMessage(playerid, COLOR_WHITE, "** Imate dvije opcije,ћelite li umrijeti ili nastaviti RP-ati i zvati doktora? **");
	  	SendClientMessage(playerid, COLOR_WHITE, "** Ako ћelite umrijeti koristite /die,ako ћelite nastaviti RP-ati /live **");
	  	new playername[24];
   		new string[128];
    	GetPlayerName(playerid, playername, sizeof(playername));
	    format(string, sizeof(string), "** %s pada na pod i počinje se tresti.", playername);
  			ProxDetector(30.0, playerid, string, COLOR_LIGHTGREEN,COLOR_LIGHTGREEN,COLOR_LIGHTGREEN,COLOR_LIGHTGREEN,COLOR_LIGHTGREEN);
  			gInjured[playerid] = 1;
  	 	SetPlayerHealth(playerid,25.0);
		  TogglePlayerControllable(playerid, 0);
			ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
			ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
	 	}
//OnPlayerDeath
else if (reason == 31)
	{
	  gKilled[playerid] = 1;
	  new Float:x, Float:y, Float:z;
	  GetPlayerPos(playerid, x, y, z);
	  PlayerPort[playerid][pPortx] = x;
	  PlayerPort[playerid][pPorty] = y;
	  PlayerPort[playerid][pPortz] = z;
	}
BTW.Part with SetPlayerSpawn doesn't work
Reply
#2

Can you tell us what AntiPG is first of all?


EDIT: What is the problem?
Reply
#3

Quote:
Originally Posted by DJDhan
Can you tell us what AntiPG is first of all?
It's system against abusing nonRP,so,you run,i chase you and i take out m4 and i start shooting you.If you continue running,that's nonRP,but if you stop,that's RP.So,if i kill you with M4,you die,but you don't spawn on regular spawn place,you are ported to place where you died and you are frozen and animation starts to loop.You can choose to live(you call ambulance) and you choose death.If you choose death,you lose all your money,drugs,materials and weapons that are with you
Reply
#4

You didn't see I edited my post with another question. Nvm, so what seems to be the problem? Errors,warnings or something in-game?
Reply
#5

Quote:
Originally Posted by DJDhan
You didn't see I edited my post with another question. Nvm, so what seems to be the problem? Errors,warnings or something in-game?
No warnings,no errors,but it dosen't work.After someone kills me with m4,it doesn't port me on place where i was killed,it doesn't freezes me,it doesn't loop any animations,just like that script doesn't exists
Reply
#6

Are you sure you have it under OnPlayerSpawn ? I just wondered since you have

Quote:
Originally Posted by shithead
//on SetPlayerSpawn
if(gKilled[playerid] == 1)
.
.
.
Reply
#7

Quote:
Originally Posted by DJDhan
Are you sure you have it under OnPlayerSpawn ? I just wondered since you have

Quote:
Originally Posted by shithead
//on SetPlayerSpawn
if(gKilled[playerid] == 1)
.
.
.
I have it under SetPlayerSpawn,not OnPlayerSpawn
Reply
#8

Anyone,please help me!!!I need this get fixed as soon as possible!
Reply
#9

sry for double post,but i realy need this script fixed,someone help!!!Don't be jerks and tell me how to fix this!
Reply
#10

You need to have it under OnPlayerSpawn.

Quote:
Originally Posted by shithead
Don't be jerks and tell me how to fix this!
Please don't flame.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)