13.12.2012, 22:19
pawn Код:
CMD:duel(playerid,params[])
{
new
string[150],
Float:vida[MAX_PLAYERS]
;
GetPlayerHealth(playerid,vida[playerid]);
if(NoDuelo[playerid] == true) return SendClientMessage(playerid,red,"ERROR: You are in duel");
if(DueloSendoUsado == 1) return SendClientMessage(playerid,red,"ERROR: One duel already happening");
if(duelid == 0 || 11) return SendClientMessage(playerid,red,"ERROR: Duel styles is of 1 on 10!");
if(sscanf(params,"d",duelid)) return SendClientMessage(playerid,red,"USAGE: /duel [duel id]");
if(vida[playerid] <= 100)
{
format(string,sizeof(string),"[DUEL]: %s teleported to the duel %d ( /duel )",Nome(playerid),duelid);
SendClientMessageToAll(ciano,string);
}
else
{
SendClientMessage(playerid,red,"ERROR: Need of full health");
}
if(jogadoresnoduel == 2)
{
DueloSendoUsado = 1;
}
else
{
//DUEL STYLE 1
if(duelid == 1)
{
jogadoresnoduel ++;
SetPlayerPos(playerid,0.0,1.1,2.2);
SetPlayerVirtualWorld(playerid,254862318);
SetPlayerInterior(playerid,0);
SetPlayerArmour(playerid,100.0);
SetPlayerHealth(playerid,100.0);
GivePlayerWeapon(playerid,34,9999);
GivePlayerWeapon(playerid,25,9999);
NoDuelo[playerid] = true;
}
else if{
if(duelid == 2)
{
jogadoresnoduel ++;
SetPlayerPos(playerid,0.0,1.1,2.2);
SetPlayerVirtualWorld(playerid,254862318);
SetPlayerInterior(playerid,0);
SetPlayerArmour(playerid,100.0);
SetPlayerHealth(playerid,100.0);
GivePlayerWeapon(playerid,24,9999);
GivePlayerWeapon(playerid,25,9999);
NoDuelo[playerid] = true;
}
else if{
if(duelid == 3)
{
jogadoresnoduel ++;
SetPlayerPos(playerid,0.0,1.1,2.2);
SetPlayerVirtualWorld(playerid,254862318);
SetPlayerInterior(playerid,0);
SetPlayerArmour(playerid,100.0);
SetPlayerHealth(playerid,100.0);
GivePlayerWeapon(playerid,27,9999);
GivePlayerWeapon(playerid,24,9999);
NoDuelo[playerid] = true;
}
else if{
if(duelid == 4)
{
jogadoresnoduel ++;
SetPlayerPos(playerid,0.0,1.1,2.2);
SetPlayerVirtualWorld(playerid,254862318);
SetPlayerInterior(playerid,0);
SetPlayerArmour(playerid,100.0);
SetPlayerHealth(playerid,100.0);
GivePlayerWeapon(playerid,31,9999);
GivePlayerWeapon(playerid,25,9999);
NoDuelo[playerid] = true;
}
else if{
if(duelid == 5)
{
jogadoresnoduel ++;
SetPlayerPos(playerid,0.0,1.1,2.2);
SetPlayerVirtualWorld(playerid,254862318);
SetPlayerInterior(playerid,0);
SetPlayerArmour(playerid,100.0);
SetPlayerHealth(playerid,100.0);
GivePlayerWeapon(playerid,26,9999);
GivePlayerWeapon(playerid,32,9999);
NoDuelo[playerid] = true;
}
else if{
if(duelid == 6)
{
jogadoresnoduel ++;
SetPlayerPos(playerid,0.0,1.1,2.2);
SetPlayerVirtualWorld(playerid,254862318);
SetPlayerInterior(playerid,0);
SetPlayerArmour(playerid,100.0);
SetPlayerHealth(playerid,100.0);
GivePlayerWeapon(playerid,16,9999);
NoDuelo[playerid] = true;
}
else if{
if(duelid == 7)
{
jogadoresnoduel ++;
SetPlayerPos(playerid,0.0,1.1,2.2);
SetPlayerVirtualWorld(playerid,254862318);
SetPlayerInterior(playerid,0);
SetPlayerArmour(playerid,100.0);
SetPlayerHealth(playerid,100.0);
GivePlayerWeapon(playerid,26,9999);
NoDuelo[playerid] = true;
}
else if{
if(duelid == 8)
{
jogadoresnoduel ++;
SetPlayerPos(playerid,0.0,1.1,2.2);
SetPlayerVirtualWorld(playerid,254862318);
SetPlayerInterior(playerid,0);
SetPlayerArmour(playerid,100.0);
SetPlayerHealth(playerid,100.0);
GivePlayerWeapon(playerid,24,9999);
NoDuelo[playerid] = true;
}
else if{
if(duelid == 9)
{
jogadoresnoduel ++;
SetPlayerPos(playerid,0.0,1.1,2.2);
SetPlayerVirtualWorld(playerid,254862318);
SetPlayerInterior(playerid,0);
SetPlayerArmour(playerid,100.0);
SetPlayerHealth(playerid,100.0);
GivePlayerWeapon(playerid,18,9999);
NoDuelo[playerid] = true;
}
else if{
if(duelid == 10)
{
jogadoresnoduel ++;
SetPlayerPos(playerid,0.0,1.1,2.2);
SetPlayerVirtualWorld(playerid,254862318);
SetPlayerInterior(playerid,0);
SetPlayerArmour(playerid,100.0);
SetPlayerHealth(playerid,100.0);
GivePlayerWeapon(playerid,4,1);
NoDuelo[playerid] = true;
}
}
}
}
}
}
}
}
}
}
}
//[Style 01]: Sniper+Shotgun
//[Style 02]: Shotgun+Deagle
//[Style 03]: Spas12+Deagle
//[Style 04]: M4+Shotgun
//[Style 05]: Sawn+Tec9
//[Style 06]: Granade
//[Style 07]: SwanOff
//[Style 08]: Deagle
//[Style 09]: Motovs
//[Style 10]: Knife
return 1;
}
valeu ai e obrigado pela atenзгo.