new Conta[MAX_PLAYERS][DATA];
enum Data
{
Float:saved_armour,
Float:saved_health,
Float:saved_X,
Float:saved_Y,
Float:saved_Z,
Float:saved_ang,
saved_int
}
OnPlayerCommandText
{
if (strcmp(cmd, "/x1", true) == 0)
{
SavePlayerData(playerid);
}
if (strcmp(cmd, "/sair", true) == 0)
{
LoadPlayerData(playerid);
}
}
forward public SavePlayerData(playerid);
public SavePlayerData(playerid)
{
new Float: health, Float: armour, Float: SX, Float: SY, Float: SZ, Float:ang;
GetPlayerHealth(playerid, health);
GetPlayerArmour(playerid, armour);
GetPlayerPos(playerid, SX, SY, SZ);
GetPlayerFacingAngle(playerid, ang);
//
Conta[playerid][saved_money] = GetPlayerMoney(playerid);
Conta[playerid][saved_skin] = GetPlayerSkin(playerid);
Conta[playerid][saved_health] = health;
if (armour > 0) Conta[playerid][saved_armour] = armour;
Conta[playerid][saved_X] = SX;
Conta[playerid][saved_Y] = SY;
Conta[playerid][saved_Z] = SZ;
Conta[playerid][saved_ang] = ang;
Conta[playerid][saved_int] = GetPlayerInterior(playerid);
}
forward public LoadPlayerData(playerid);
public LoadPlayerData(playerid)
{
SetPlayerHealth(playerid, Conta[playerid][saved_health]);
if (Conta[playerid][saved_armour] > 0) SetPlayerArmour(playerid, Conta[playerid][saved_armour]);
GivePlayerMoney(playerid, Conta[playerid][saved_money]-GetPlayerMoney(playerid));
SetPlayerSkin(playerid, Conta[playerid][saved_skin]);
SetPlayerPos(playerid, Conta[playerid][saved_X], Conta[playerid][saved_Y], Conta[playerid][saved_Z]);
SetPlayerFacingAngle(playerid, Conta[playerid][saved_ang]);
SetPlayerInterior(playerid, Conta[playerid][saved_int]);
}
pawn Код:
|
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(74) : error 017: undefined symbol "DATA" C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(74) : error 009: invalid array size (negative, zero or out of bounds) C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5547) : error 017: undefined symbol "saved_money" C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5548) : error 017: undefined symbol "saved_skin" C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5549) : warning 213: tag mismatch C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5550) : warning 213: tag mismatch C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5551) : warning 213: tag mismatch C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5552) : warning 213: tag mismatch C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5553) : warning 213: tag mismatch C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5554) : warning 213: tag mismatch C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5555) : warning 213: tag mismatch C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5559) : warning 213: tag mismatch C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5560) : warning 213: tag mismatch C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5560) : warning 213: tag mismatch C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5561) : error 017: undefined symbol "saved_money" C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5562) : error 017: undefined symbol "saved_skin" C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5563) : warning 213: tag mismatch C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5563) : warning 213: tag mismatch C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5563) : warning 213: tag mismatch C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5564) : warning 213: tag mismatch C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5565) : warning 213: tag mismatch Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 6 Errors.
enum Data
{
saved_money,
saved_skin,
Float:saved_armour,
Float:saved_health,
Float:saved_X,
Float:saved_Y,
Float:saved_Z,
Float:saved_ang,
saved_int
}
new Conta[MAX_PLAYERS][DATA];
Bota o
new Conta[MAX_PLAYERS][DATA]; depois do enum e adiciona dentro do mesmo saved_money e saved_skin fica assim: pawn Код:
|
C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(74) : error 017: undefined symbol "DATA" C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(74) : error 009: invalid array size (negative, zero or out of bounds) C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5554) : warning 213: tag mismatch C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5555) : warning 213: tag mismatch C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5556) : warning 213: tag mismatch C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5557) : warning 213: tag mismatch C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5558) : warning 213: tag mismatch C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5559) : warning 213: tag mismatch C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5560) : warning 213: tag mismatch C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5561) : warning 213: tag mismatch C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5562) : warning 213: tag mismatch C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5566) : warning 213: tag mismatch C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5567) : warning 213: tag mismatch C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5567) : warning 213: tag mismatch C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5568) : warning 213: tag mismatch C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5569) : warning 213: tag mismatch C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5570) : warning 213: tag mismatch C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5570) : warning 213: tag mismatch C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5570) : warning 213: tag mismatch C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5571) : warning 213: tag mismatch C:\Users\marcos\Desktop\MyServers\Brasil City Furious\gamemodes\BCF.pwn(5572) : warning 213: tag mismatch Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors.
enum Data
{
saved_money,
saved_skin,
Float:saved_armour,
Float:saved_health,
Float:saved_X,
Float:saved_Y,
Float:saved_Z,
Float:saved_ang,
saved_int
}
new Conta[MAX_PLAYERS][Data];
pawn Код:
|