Que varible [Consulta]
#1

Hola gente del samp, estoy haciendo un sistema derby pero me preguntaba que variable podia utilizar si en un caso caigo al agua con el auto y me respawnee nuevamente afuera de minijuego.


mi funcion

Si se sale del area del derby.
pawn Код:
else if(playerinqderby[playerid] == 1)  {
new DerbyPlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, DerbyPlayerName, sizeof(DerbyPlayerName));
format(string, sizeof(string), "%s fue descalificado del derby: %d", DerbyPlayerName, qderbyrank);
SendClientMessageToAll(0xFFFF00AA, string);
playerinqderby[playerid] = 0;
playerinminigame[playerid] = 0;
qbloodringfull[playerinqbloodring[playerid]] = 0;
playerinqbloodring[playerid] = -1;
if(qderbyrank <= 2)
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i) && playerinqderby[i] == 1)
{
new winnername[256];
GetPlayerName(i,winnername, sizeof(winnername));
RewardCalc(i,100,1000);
format(string, sizeof(string), "~r~%s ~n~~y~ganу el encuentro ~n~~w~$%d", winnername, reward);
GameTextForAll( string, 5000, 3 );
GivePlayerMoney(i,reward);
playerinqderby[i] = 0;
playerinminigame[i] = 0;
SetPlayerVirtualWorld(i,0);
SetPlayerInterior(playerid, 0);
SetPlayerPos(i, spawnX, spawnY, spawnZ);
}
}
si cae al agua no se que varible poner XD


pawn Код:
else if(playerinqderby[playerid] == 1)  {
new DerbyPlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, DerbyPlayerName, sizeof(DerbyPlayerName));
format(string, sizeof(string), "%s fue eliminado el encuentro: %d", DerbyPlayerName, qderbyrank);
SendClientMessageToAll(0xFFFF00AA, string);
playerinqderby[playerid] = 0;
playerinminigame[playerid] = 0;
qbloodringfull[playerinqbloodring[playerid]] = 0;
playerinqbloodring[playerid] = -1;
if(qderbyrank <= 2)
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i) && playerinqderby[i] == 1)
{
new winnername[256];
GetPlayerName(i,winnername, sizeof(winnername));
RewardCalc(i,100,1000);
format(string, sizeof(string), "%s gano el encuentro $%d", winnername, reward);
SendClientMessageToAll(0xFFFF00AA, string);
GivePlayerMoney(i,reward);
playerinqderby[i] = 0;
playerinminigame[i] = 0;
SetPlayerVirtualWorld(i,0);
SetPlayerInterior(playerid, 0);
SetPlayerPos(i, spawnX, spawnY, spawnZ);
}
gracias
Reply
#2

Puedes usar este stock

pawn Код:
stock IsPlayerInWater(playerid)
{
        new anim = GetPlayerAnimationIndex(playerid);
        if (((anim >=  1538) && (anim <= 1542)) || (anim == 1544) || (anim == 1250) || (anim == 1062)) return 1;
        return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)