28.01.2015, 18:34
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.
si cae al agua no se que varible poner XD
gracias
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);
}
}
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);
}