public OnPlayerSpawn(playerid) { new Float:phealth; GetPlayerHealth(playerid, phealth); if(phealth > 100) { SetPlayerHealthEx(playerid, 100); } if(IsPlayerNPC(playerid)) { Check_Avion_Login(playerid); } SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, DEFAULT_WEAPON_SKILL); // 9M UpdatePlayerScore(playerid); ClearPlayerSound(playerid, -1); SetPlayerColor(playerid, COLOR_INVISIBLE); if(GetPlayerData[playerid][P_Jailed] == 1 && GetPlayerData[playerid][P_JailedTime] > 0) // Admin Jail { KickReason[playerid] = false; LimpiarChat(playerid, DEFAULT_CHAT_CLEAR); SendErrorMessage(playerid, "0133", "Aъn estбs Encarcelado desde tu ъltima desconexiуn"); SetPlayerPosEx(playerid, 198.2186, 162.4141, 1003.0300); // POS JAIL SetPlayerInteriorEx(playerid, 3); SetPlayerHealthEx(playerid, 60); return 1; } else if(GetPlayerData[playerid][P_Jailed] == 2 && GetPlayerData[playerid][P_JailedTime] > 0) // Arrestado LSPD { KickReason[playerid] = false; LimpiarChat(playerid, DEFAULT_CHAT_CLEAR); SendErrorMessage(playerid, "0133", "Aъn estбs Encarcelado desde tu ъltima desconexiуn"); SetPlayerPosEx(playerid, 264.52, 77.46, 1001.04); SetPlayerInteriorEx(playerid, 6); SetPlayerHealthEx(playerid, 60); return 1; } if(IsPlayerConnectedEx(playerid)) { if(PJMurio[playerid] == true) { new Player_Faccion = FACTION_TYPE_CIVIL; SetPlayerHealthEx(playerid, MAX_PLAYER_SPAWN_HEALTH); SetPlayerSkinEx(playerid, GetPlayerData[playerid][P_Skin]); SetPlayerVirtualWorldEx(playerid, FaccionesDatos[Player_Faccion][fWorld]); SetPlayerInteriorEx(playerid, FaccionesDatos[Player_Faccion][fInterior]); FijarPosJugador(playerid, FaccionesDatos[Player_Faccion][fSpawn_X], FaccionesDatos[Player_Faccion][fSpawn_Y], FaccionesDatos[Player_Faccion][fSpawn_Z], FaccionesDatos[Player_Faccion][fSpawn_AN]); SendClientMessage(playerid, COLOR_AZUL_CLARO, "Mйdico: {FFFFFF}Usted ha sufrнdo un accidente y ha sido trasladado al Hospital. Te han dado el alta, bienvenido a Casa."); GivePlayerMoneyEx(playerid, -10), GiveThatPlayerMoneyBM(playerid); GameTextForPlayer(playerid, "~r~-$10!", 5000, 1); PJMurio[playerid] = false; } else if(MurioViendoTV[playerid]) { MurioViendoTV[playerid] = false; SetPlayerPosEx(playerid, PosAntesMirarTV[playerid][0], PosAntesMirarTV[playerid][1], PosAntesMirarTV[playerid][2]); SetPlayerHealthEx(playerid, PosAntesMirarTV[playerid][3]); SetPlayerArmourEx(playerid, PosAntesMirarTV[playerid][4]); SetPlayerVirtualWorldEx(playerid, VoIAntesMirarTV[playerid][0]); SetPlayerInteriorEx(playerid, VoIAntesMirarTV[playerid][1]); SetPlayerSkinEx(playerid, GetPlayerData[playerid][P_Skin]); } else if(!GetPlayerData[playerid][P_Registred] && !YPPV[playerid]) { LoadPlayerSpawn(playerid, false); } else if(GetPlayerData[playerid][P_Registred] && !YPPV[playerid]) { LoadPlayerSpawn(playerid, true); } else if(SelectingClothes[playerid]) { SetPlayerSkinEx(playerid, GetPlayerData[playerid][P_Skin]); SelectingClothes[playerid] = false; } } else { SetPlayerWelcomeType(playerid, WELCOME_TYPE_NORMAL); } return 0; }
Tal vez te falta reiniciarle la variable al jugador al entrar al sv o loguearse prueba poniendo PJMurio[playerid] = false;
|
Tal vez te falta reiniciarle la variable al jugador al entrar al sv o loguearse prueba poniendo PJMurio[playerid] = false;
|
C:\Users\Sifdin\Downloads\BioGamesRP\gamemodes\WP-RP.pwn(2804) : error 001: expected token: ")", but found ";"
C:\Users\Sifdin\Downloads\BioGamesRP\gamemodes\WP-RP.pwn(2804) : error 036: empty statement
C:\Users\Sifdin\Downloads\BioGamesRP\gamemodes\WP-RP.pwn(2817) : error 029: invalid expression, assumed zero
C:\Users\Sifdin\Downloads\BioGamesRP\gamemodes\WP-RP.pwn(2817) : warning 215: expression has no effect
C:\Users\Sifdin\Downloads\BioGamesRP\gamemodes\WP-RP.pwn(2817) : error 001: expected token: ";", but found "if"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
2804: if(PJMurio[playerid] == false; 2817: else if(MurioViendoTV[playerid])
error 001: expected token: ")", but found ";" |
if(PJMurio[playerid] == false;
public OnPlayerConnect(playerid)
{
PJMurio[playerid] = false;
return 1;
}
El if(PJMurio[playerid] == false; cбmbialo por if(PJMurio[playerid] == false) y lo que te dije anteriormente agrйgalo al callback onplayerconnect como en el ejemplo de enseguida;
pawn Код:
|