05.05.2012, 14:50
axo mt loko akele evento do {paintball] chuck norris quem mata ele pega a minigun e vira o a skin [264] A do Palhaзo
se alguem tiver Agradeзo muitoooo!!
se alguem tiver Agradeзo muitoooo!!
#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;
}
#include a_samp
#include zcmd
new bool:Chuck[MAX_PLAYERS], bool:Evento[MAX_PLAYERS], players;
CMD:entrarevento(playerid) {
new s[128], n[24];
if(Evento[playerid])
return false;
if(players == 0) {
players ++;
GetPlayerName(playerid, n, 24);
format(s, 128, "%s foi para o evento do Chuck Norris.! [Jogadores: %i]", n, players);
SendClientMessageToAll(-1, s);
Evento[playerid] = true;
SendClientMessage(playerid, -1, "Sу tem vocк no evento, entгo vocк й o chuck norris da vez.");
SetPlayerPos(playerid, x, y, z);//pos
Chuck[playerid] = true;
GivePlayerWeapon(playerid, weapon, ammo); //arma e municao
SetPlayerSkin(playerid, skinid); //skin
SetPlayerArmour(playerid, 100);
SetPlayerHealth(playerid, 100);
TogglePlayerControllable(playerid, true);
}
else {
players ++;
GetPlayerName(playerid, n, 24);
format(s, 128, "%s foi para o evento do Chuck Norris.! [Jogadores: %i]", n, players);
SendClientMessageToAll(-1, s);
Evento[playerid] = true;
SetPlayerPos(playerid, x, y, z);
}
return true;
}
CMD:sairevento(playerid) {
if(!Evento[playerid])
return false;
if(Chuck[playerid]) {
Chuck[playerid] = false;
for(new i; i < MAX_PLAYERS; ++i) {
if(Evento[i]) {
SendClientMessageToAll(-1, "O Chuck Norris saiu do evento.. evento encerrado.");
SpawnPlayer(i);
Evento[i] = false;
players = 0;
}
}
}
SendClientMessage(playerid, -1, "Vocк saiu do evento..");
return true;
}
public OnPlayerDisconnect(playerid) {
if(Evento[playerid])
return players --;
if(Chuck[playerid]) {
Chuck[playerid] = false;
for(new i; i < MAX_PLAYERS; ++i) {
if(Evento[i]) {
SendClientMessageToAll(-1, "O Chuck Norris saiu do servidor.. evento encerrado.");
SpawnPlayer(i);
Evento[i] = false;
players = 0;
}
}
}
return true;
}
public OnPlayerSpawn(playerid) {
if(Evento[playerid]) {
SendClientMessage(playerid, -1, "Vocк spawnou no evento Chuck norris..");
SetPlayerPos(playerid, x, y, z);
}
return true;
}
public OnPlayerDeath(playerid, killerid, reason) {
if(Chuck[playerid]) {
Chuck[killerid] = true;
Chuck[playerid] = false;
new s[128], n[24];
GetPlayerName(killerid, n, 24);
format(s, 128, "%s й o novo Chuck Norris do evento.!", n);
SendClientMessageToAll(-1, s);
GivePlayerWeapon(killerid, weapon, ammo);
SetPlayerSkin(killerid, skinid);
SetPlayerArmour(killerid, 100);
SetPlayerHealth(killerid, 100);
TogglePlayerControllable(killerid, true);
}
return true;
}
dei uma olhada mas с tem o sistema de mata o chuck e vira o chuck, queria sу isso.
|
new bool:PaintBall[MAX_PLAYERS];
new KillsPaintBall[MAX_PLAYERS];
public OnPlayerDeath(playerid, killerid, reason)
{
new str[128], killername[MAX_PLAYER_NAME];
KillsPaintBall[killerid] = 0;
if(PaintBall[playerid] == true)
{
SetPlayerPos(playerid, 0, 0, 0); //Pos do PaintBall
if(PaintBall[killerid] == true)
{
KillsPaintBall[killerid] ++;
if(KillsPaintBall[killerid] >= 10)
{
GetPlayerName(killerid, killername, sizeof(killername));
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PaintBall[i] == true)
{
format(str, sizeof(str), "%s й o Chucl Norris! Jб matou 10 no PaintBall sem morrer!");
SendClientMessage(i, -1, str);
}
}
}
}
}
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/paintball", cmdtext, true, 10) == 0)
{
PaintBall[playerid] = true;
SetPlayerPos(playerid, 0, 0, 0); //Pos do PaintBall
SendClientMessage(playerid, -1, "Bem Vindo ao PaintBall");
return 1;
}
return 0;
}