06.05.2012, 15:20
alguem ai?
tipo eu pequei um FS do evento parecido, ai eu queria edita ele,quando o playr morrer ele volta,e fazer um player especial[O Chuck] ai quem matasse ele virava o Chuck e nascia com a Minigun, alguem ai pode me ajudar?
tipo eu pequei um FS do evento parecido, ai eu queria edita ele,quando o playr morrer ele volta,e fazer um player especial[O Chuck] ai quem matasse ele virava o Chuck e nascia com a Minigun, alguem ai pode me ajudar?
pawn Код:
#include <a_samp>
forward dmareatimer();
forward dmsafetimer();
new dmzone,safezone1, safezone2;
main()
{
print("\n----------------------------------");
print(" Paintball Deathmatch FS[by Yuryfury] Loaded");
print("----------------------------------\n");
}
public OnGameModeInit()
{
//==========DMZONE & SAFE ZONE==========
//ZONES
dmzone = GangZoneCreate(-110.0708,1447.8772,127.6751,1608.9224);
safezone1 = GangZoneCreate(43.0219,1526.7227,73.6873,1575.5319);
safezone2 = GangZoneCreate(-41.7889,1465.3719,7.7765,1500.9086);
//==========OBJECTS==========
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/pbdm", cmdtext, true, 10) == 0)//TELEPORT
{
switch(random(1))
{
case 0:
{
SetPlayerPos(playerid,60.1784,1553.6521,12.7500);
GivePlayerWeapon(playerid,44,1);
GivePlayerWeapon(playerid,31,10000);
}
case 1:
{
SetPlayerPos(playerid,-16.0340,1482.2052,12.7500);
GivePlayerWeapon(playerid,44,1);
GivePlayerWeapon(playerid,31,10000);
}
}
SetTimer("dmareatimer",1000,1);
SetTimer("dmsafetimer",1000,1);
return 1;
}
return 0;
}
public OnPlayerConnect(playerid)
{
GangZoneShowForAll(dmzone,0xF6000076);
GangZoneShowForAll(safezone1,0x00F60076);
GangZoneShowForAll(safezone2,0x00F60076);
return 1;
}
public dmareatimer()//Checks To See If A Player Is In The DM Zone or not. If The Player Is Not, The Weapons Are Reset.
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (!IsPlayerInArea(i, -110.0708,1447.8772,127.6751,1608.9224))
{
ResetPlayerWeapons(i);
}
}
}
/*public dmsafetimer()//If A Player Is In The Safe Area
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerInArea(i,38.0219,1521.7227,78.6873,1580.5319)||IsPlayerInArea(i,-46.7889,1460.3719,12.7765,1505.9086))
{
Do Something Here (i.e. remove weapons,godmode)
}
}
}*/
//==========ISPLAYERINAREA==========
stock IsPlayerInArea(playerid, Float:min_x, Float:min_y, Float:max_x, Float:max_y)
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
if(X <= max_x && X >= min_x && Y <= max_y && Y >= min_y) return 1;
return 0;
}