04.11.2009, 14:26
I'm making a register/login system (using dudb - http://forum.sa-mp.com/index.php?topic=684.0)
but I don't know how to read a value after char " = ". I've ask that in DUDB topic, but nobody answers to me.
I've created the register/login command, but there is a problem when trying to read data.
And I get an error "Must be assigned into array" or something like that.
I remind you, I already ask in DUDB official topic but nobody answers.
but I don't know how to read a value after char " = ". I've ask that in DUDB topic, but nobody answers to me.
I've created the register/login command, but there is a problem when trying to read data.
pawn Код:
forward ReadPlayerData(playerid);
pawn Код:
new level[MAX_PLAYERS];
new admin[MAX_PLAYERS];
new deaths[MAX_PLAYERS];
new kills[MAX_PLAYERS];
//...
pawn Код:
public OnPlayerConnect(playerid)
{
level[playerid] = 0;
admin[playerid] = 0;
deaths[playerid] = 0;
kills[playerid] = 0;
return 1;
}
pawn Код:
COMMAND:login(playerid,params[]) // zcmd
{
// bla bla SendClientMsg and other stuff
ReadPlayerData(playerid);
return 1;
}
pawn Код:
public ReadPlayerData(playerid)
{
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,sizeof(pName));
level[playerid] = dUser(pName).("Level");
admin[playerid] = dUser(pName).("Admin");
deaths[playerid] = dUser(pName).("Deaths");
kills[playerid] = dUser(pName).("Kills");
SetPlayerScore(playerid,level[playerid]);
//...
return 1;
}
I remind you, I already ask in DUDB official topic but nobody answers.