Define help
#1

So this is the stats cmd:
PHP код:
dcmd_stats(playeridparams[])
{
    
#pragma unused params
    
new statz[1024];
    
strcat(statz"Score: %d\n",GetPlayerScore(playerid));
    
strcat(statz"Bank: %d\n",GetPlayerBankcash(playerid));
    
strcat(statz"Money: $%d\n",GetPlayerCash(playerid));
    
strcat(statz"Kills: %d\n",KILLZ(playerid));
    
strcat(statz"Admin: %d\n",Adminlevel(playerid));
    
strcat(statz"Army: %d\n",Army(playerid));
    
strcat(statz"SWAT: %d\n",SWAT(playerid));
    
strcat(statz"Regular: %d\n",RegularPlayer(playerid));
    
strcat(statz"TerrorLVL: %d\n",TSkill(playerid));
    
strcat(statz"RobbberLVL: %d\n",GetPlayerRobSkill(playerid));
    
strcat(statz"C4: %d\n",GetPlayerHasPackC4(playerid));
    
strcat(statz"Rope: %d\n",GetPlayerHasPackRope(playerid));
    
ShowPlayerDialog(playerid,644,DIALOG_STYLE_MSGBOX,"Stats",statz,"Close","");
    return 
true;

But how i can define these and were ?

PHP код:
C:\Users\WeeD\Desktop\samp03\gamemodes\NLCNR.pwn(3445) : error 017undefined symbol "GetPlayerBankcash"
C:\Users\WeeD\Desktop\samp03\gamemodes\NLCNR.pwn(3446) : error 017undefined symbol "GetPlayerCash"
C:\Users\WeeD\Desktop\samp03\gamemodes\NLCNR.pwn(3447) : error 017undefined symbol "KILLZ"
C:\Users\WeeD\Desktop\samp03\gamemodes\NLCNR.pwn(3448) : error 017undefined symbol "Adminlevel"
C:\Users\WeeD\Desktop\samp03\gamemodes\NLCNR.pwn(3449) : error 017undefined symbol "Army"
C:\Users\WeeD\Desktop\samp03\gamemodes\NLCNR.pwn(3450) : error 017undefined symbol "SWAT"
C:\Users\WeeD\Desktop\samp03\gamemodes\NLCNR.pwn(3451) : error 017undefined symbol "RegularPlayer"
C:\Users\WeeD\Desktop\samp03\gamemodes\NLCNR.pwn(3452) : error 017undefined symbol "TSkill"
C:\Users\WeeD\Desktop\samp03\gamemodes\NLCNR.pwn(3453) : error 017undefined symbol "GetPlayerRobSkill"
C:\Users\WeeD\Desktop\samp03\gamemodes\NLCNR.pwn(3454) : error 017undefined symbol "GetPlayerHasPackC4"
C:\Users\WeeD\Desktop\samp03\gamemodes\NLCNR.pwn(3455) : error 017undefined symbol "GetPlayerHasPackRope"
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
11 Errors

Reply
#2

Show me your player enums.
Reply
#3

PHP код:
enum player_info
{
    
objid[sizeof(Objects)],
    
bool:view[sizeof(Objects)]
}
new 
Player[MAX_PLAYERS][player_info];
bool:IsInReach(Float:x,Float:y,Float:z,Float:x2,Float:y2,Float:z2,Float:dist)
{
    
= (x2) ? x2 x2 x;
    if(
dist) return false;
    
= (y2) ? y2 y2 y;
    if(
dist) return false;
    
= (z2) ? z2 z2 z;
    if(
dist) return false;
    return 
true;
}
new 
timer
If i havent mistaken. But if im tell me were couse im new in this
Reply
#4

Quote:
Originally Posted by Sojo12
Посмотреть сообщение
Show me your player enums.
make the player enums that will help in saving stats and loading and more ... if u don't have one
Reply
#5

u need to make enums for saving data there are nothing like u used for getting stats
pawn Код:
GetPlayerCash(playerid)
nothing like that change it to
pawn Код:
GetPlayerMoney(playerid)
sorry double post didn't notice
Reply
#6

Go read a saving tutorial, will be helpful for you.
Reply
#7

Quote:
Originally Posted by AroseKhanNaizi
Посмотреть сообщение
u need to make enums for saving data there are nothing like u used for getting stats
pawn Код:
GetPlayerCash(playerid)
nothing like that change it to
pawn Код:
GetPlayerMoney(playerid)
Well when i opened a player.dudb file i saw these and thats the reason why i used those :
PHP код:
Money=750000
Bankcash
=1005000
Score
=0
Adminlevel
=1337
Nameban
=0
Army
=1337
SWAT
=1337
RegularPlayer
=1337
DrugHouseOwner
=0
OttoOwner
=0
TSkill
=20
RobSkill
=21
HasPackC4
=20
HasPackRope
=20
HasPackMoney
=0
SavedJailTime
=0
SavedWantedLevel
=0
Cash
=750000 
Reply
#8

but when there is no saving system how u using it as DaniceMcHarley said read some tut for saving
Reply
#9

i think u are using un-complete code taken from other GM or FS please use full code from where u have taken this /stats command or make ur own one
Reply
#10

Quote:
Originally Posted by DaniceMcHarley
Посмотреть сообщение
Go read a saving tutorial, will be helpful for you.
I start to think so 2.Couse on my server money is saving but its saving only the starting balance all the time but not the earned ;/

Quote:
Originally Posted by BroZeus
Посмотреть сообщение
i think u are using un-complete code taken from other GM or FS please use full code from where u have taken this /stats command or make ur own one
Umm i asked somone to make a base so i can just continue but as u see i got bunch of probs right now ;/
Reply


Forum Jump:


Users browsing this thread: 7 Guest(s)