16.03.2011, 15:05
public SavePlayerData(playerid)
{
new Name[MAX_PLAYER_NAME], PlayerFile[128], Float: LastPos[3];
GetPlayerName(playerid, Name,sizeof(Name));
GetPlayerPos(playerid, LastPos[0], LastPos[1], LastPos[2]);
format(PlayerFile, sizeof(PlayerFile),"save/%s.ini", Name);
if(!fexist(PlayerFile))
{
dini_Create(PlayerFile);
}
dini_IntSet(PlayerFile,"Weapon", GetPlayerWeapon(playerid));
dini_IntSet(PlayerFile,"ammo", GetPlayerAmmo(playerid));
dini_IntSet(PlayerFile,"Money", GetPlayerMoney(playerid));
dini_IntSet(PlayerFile,"Xp", GetPlayerScore(playerid));
dini_FloatSet(PlayerFile, "Pos_X", LastPos[0]);
dini_FloatSet(PlayerFile, "Pos_Y", LastPos[1]);
dini_FloatSet(PlayerFile, "Pos_Z", LastPos[2]);
return 1;
}
public LoadPlayerData(playerid)
{
new Name[MAX_PLAYER_NAME], PlayerFile[128];
GetPlayerName(playerid, Name,sizeof(Name));
format(PlayerFile, sizeof(PlayerFile), "save/%s.ini", Name);
if(!fexist(PlayerFile)) return 1;
GivePlayerWeapon(playerid, dini_Int(PlayerFile, "Weapon"));
SetPlayerAmmo(playerid, dini_Int(PlayerFile, "ammo"));
SetPlayerScore(playerid, dini_Int(PlayerFile, "Xp"));
SetPlayerPos(playerid, dini_Float(PlayerFile, "Pos_X"), dini_Float(PlayerFile, "Pos_Y"), dini_Float(PlayerFile, "Pos_Z"));
GivePlayerMoney(playerid, dini_Int(PlayerFile, "Money"));
return 1;
}
C:\Documents and Settings\User\Desktop\gata samp serveriu\samp03csvr_win32\filterscripts\gui.pwn(23 4) : warning 202: number of arguments does not match definition
C:\Documents and Settings\User\Desktop\gata samp serveriu\samp03csvr_win32\filterscripts\gui.pwn(23 5) : warning 202: number of arguments does not match definition
dini_IntSet(PlayerFile,"Weapon", GetPlayerWeapon(playerid));
dini_IntSet(PlayerFile,"ammo", GetPlayerAmmo(playerid));
GivePlayerWeapon(playerid, dini_Int(PlayerFile, "Weapon"));
SetPlayerAmmo(playerid, dini_Int(PlayerFile, "ammo"));
help
{
new Name[MAX_PLAYER_NAME], PlayerFile[128], Float: LastPos[3];
GetPlayerName(playerid, Name,sizeof(Name));
GetPlayerPos(playerid, LastPos[0], LastPos[1], LastPos[2]);
format(PlayerFile, sizeof(PlayerFile),"save/%s.ini", Name);
if(!fexist(PlayerFile))
{
dini_Create(PlayerFile);
}
dini_IntSet(PlayerFile,"Weapon", GetPlayerWeapon(playerid));
dini_IntSet(PlayerFile,"ammo", GetPlayerAmmo(playerid));
dini_IntSet(PlayerFile,"Money", GetPlayerMoney(playerid));
dini_IntSet(PlayerFile,"Xp", GetPlayerScore(playerid));
dini_FloatSet(PlayerFile, "Pos_X", LastPos[0]);
dini_FloatSet(PlayerFile, "Pos_Y", LastPos[1]);
dini_FloatSet(PlayerFile, "Pos_Z", LastPos[2]);
return 1;
}
public LoadPlayerData(playerid)
{
new Name[MAX_PLAYER_NAME], PlayerFile[128];
GetPlayerName(playerid, Name,sizeof(Name));
format(PlayerFile, sizeof(PlayerFile), "save/%s.ini", Name);
if(!fexist(PlayerFile)) return 1;
GivePlayerWeapon(playerid, dini_Int(PlayerFile, "Weapon"));
SetPlayerAmmo(playerid, dini_Int(PlayerFile, "ammo"));
SetPlayerScore(playerid, dini_Int(PlayerFile, "Xp"));
SetPlayerPos(playerid, dini_Float(PlayerFile, "Pos_X"), dini_Float(PlayerFile, "Pos_Y"), dini_Float(PlayerFile, "Pos_Z"));
GivePlayerMoney(playerid, dini_Int(PlayerFile, "Money"));
return 1;
}
C:\Documents and Settings\User\Desktop\gata samp serveriu\samp03csvr_win32\filterscripts\gui.pwn(23 4) : warning 202: number of arguments does not match definition
C:\Documents and Settings\User\Desktop\gata samp serveriu\samp03csvr_win32\filterscripts\gui.pwn(23 5) : warning 202: number of arguments does not match definition
dini_IntSet(PlayerFile,"Weapon", GetPlayerWeapon(playerid));
dini_IntSet(PlayerFile,"ammo", GetPlayerAmmo(playerid));
GivePlayerWeapon(playerid, dini_Int(PlayerFile, "Weapon"));
SetPlayerAmmo(playerid, dini_Int(PlayerFile, "ammo"));
help