public OnPlayerSpawn(playerid)
{
if(gPlayerLogged[playerid] == 0)
{
SCM(playerid,COLOR_LIGHTBLUE,"You have to login before you spawn.");
return Kick(playerid);
}
new name[MAX_PLAYER_NAME], file[256];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file), SERVER_USER_FILE, name);
SetPlayerPos(playerid, dini_Float(file, "PosX"), dini_Float(file, "PosY"), dini_Float(file, "PosZ"));
SetPlayerFacingAngle(playerid, dini_Float(file, "PosAngle"));
SetPlayerScore(playerid, dini_Float(file, "Level"));
SetPlayerHealth(playerid, dini_Float(file, "Health"));
SetPlayerArmour(playerid, dini_Float(file, "Armour"));
SendClientMessage(playerid, COLOR_YELLOW, "Welcome to East Side Roleplay, script last edited on Monday 10 October 2011");
if(PlayerInfo[playerid][pSkin] != 0)
{
return SetPlayerSkin(playerid, dini_Int(file, "Skin"));
}
return 1;
}
C:\Users\Bart\Downloads\samp03csvr_R2-2_win32\gamemodes\esrp.pwn(318) : warning 213: tag mismatch Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Warning.
|
SetPlayerScore(playerid, dini_Float(file, "Level")); |
|
return 1; |
SetPlayerScore(playerid, dini_Int(file, "Level"));
|
public ScoreUpdate() { new Score; new name[MAX_PLAYER_NAME]; for(new i=0; i<MAX_PLAYERS; i++) { if (IsPlayerConnected(i)) { GetPlayerName(i, name, sizeof(name)); Score = PlayerInfo[i][pLevel]; SetPlayerScore(i, Score); if (Score > ScoreOld) { ScoreOld = Score; } } } } |
|
health and armor are floats
score is an integer not a float use this i think: pawn Код:
|