Could someone help?
#1

ok i did login register the one by Kush

Anyways it has kill deaths adminlevel and cash

But how could i add Score And it will save weapons?
Reply
#2

bump
Reply
#3

Quote:
Originally Posted by YanLanger
Посмотреть сообщение
bump
At least provide us a part of the code.
Reply
#4

But wich one? enums, register dialog, i can't know what code
Reply
#5

His tutorial is very buggy. You can check the comments on the thread if you want.
Reply
#6

na i fixed the bugs, I just need to know how to add that it saves score,weapons or something
Reply
#7

Well here

pawn Код:
/* Add a variable for your score, for example pScore */
enum pInfo
{
pScore;
}
OnPlayerDisconnect

pawn Код:
public OnPlayerDisconnect
{
  INI_WriteInt(file, "pScore", variablename[playerid][pScore]);
   return 1;
}
pawn Код:
OnPlayerDeath(playerid, killerid, reason)
{
   
  variablename[playerid][pScore]++;
    return 1;
}
As for your weapons, create an array with the sufficient slots (13). Then loop through them and store them into an enum variable when the player logs out. Just give him weapons that were stored in the array when he returns. Which is exactly as above.
Reply
#8

mhmm
i already have this things
PHP код:
INI_WriteInt(file"pScore"variablename[playerid][pScore]); 
here
PHP код:
forward LoadUser_data(playerid,name[],value[]);
public 
LoadUser_data(playerid,name[],value[])
{
    
INI_Int("Password",PlayerInfo[playerid][pPass]);
    
INI_Int("Cash",PlayerInfo[playerid][pCash]);
    
INI_Int("AdminLevel",PlayerInfo[playerid][pAdmin]);
    
INI_Int("Kills",PlayerInfo[playerid][pKills]);
    
INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
    return 
1;

Reply
#9

Ah and
PHP код:
variablename[playerid][pScore]++; 
PHP код:
C:\Users\yan\Desktop\Cops And Robbers\gamemodes\LSCNR.pwn(305) : error 017undefined symbol "variablename"
C:\Users\yan\Desktop\Cops And Robbers\gamemodes\LSCNR.pwn(305) : warning 215expression has no effect
C
:\Users\yan\Desktop\Cops And Robbers\gamemodes\LSCNR.pwn(305) : error 001expected token";"but found "]"
C:\Users\yan\Desktop\Cops And Robbers\gamemodes\LSCNR.pwn(305) : error 029invalid expressionassumed zero
C
:\Users\yan\Desktop\Cops And Robbers\gamemodes\LSCNR.pwn(305) : fatal error 107too many error messages on one line

Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase


4 Errors

Reply
#10

pawn Код:
forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
    INI_Int("Password",PlayerInfo[playerid][pPass]);
    INI_Int("Score",PlayerInfo[playerid][pScore]);
    INI_Int("Cash",PlayerInfo[playerid][pCash]);
    INI_Int("AdminLevel",PlayerInfo[playerid][pAdmin]);
    INI_Int("Kills",PlayerInfo[playerid][pKills]);
    INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)