25.03.2008, 11:34
Heya
I have a small problem, I know i can use the
dUserSetINT to set a value.
For example:
if (strcmp(cmd, "/setlevel", true) == 0)
{
new slevel[MAX_STRING];
slevel = strtok(cmdtext, idx);
new ilevel = strval(slevel);
dUserSetINT(PlayerName(playerid)).("playerAdminLev el",ilevel);
SendClientMessage(playerid,color_positive,"Confirm ation: Level set successfully.");
return 1;
}
(This is only an example)
Code above would set the level of the user to the value of ilevel, however what if i dont want to reset the int to a new value. Instead I want to add the ilevel to the current value of the playerAdminLevel, can this be done?
(Sorry if this is a stupid question, but i'm pretty new to scripting).
- Tom
I have a small problem, I know i can use the
dUserSetINT to set a value.
For example:
if (strcmp(cmd, "/setlevel", true) == 0)
{
new slevel[MAX_STRING];
slevel = strtok(cmdtext, idx);
new ilevel = strval(slevel);
dUserSetINT(PlayerName(playerid)).("playerAdminLev el",ilevel);
SendClientMessage(playerid,color_positive,"Confirm ation: Level set successfully.");
return 1;
}
(This is only an example)
Code above would set the level of the user to the value of ilevel, however what if i dont want to reset the int to a new value. Instead I want to add the ilevel to the current value of the playerAdminLevel, can this be done?
(Sorry if this is a stupid question, but i'm pretty new to scripting).
- Tom