09.10.2011, 18:37
Hello!
im using the login from the tutorial https://sampforum.blast.hk/showthread.php?tid=269361
When i include only #include <sscanf2> you can register and login.
Looks like this.
with the /settadmin command in the GM it looks like this.
And if you try to spawn it looks like this.
Here is the code i use when you cant login or spawn (im getting no warnings etc at all)
im using the login from the tutorial https://sampforum.blast.hk/showthread.php?tid=269361
When i include only #include <sscanf2> you can register and login.
Looks like this.
with the /settadmin command in the GM it looks like this.
And if you try to spawn it looks like this.
Here is the code i use when you cant login or spawn (im getting no warnings etc at all)
pawn Код:
CMD:setadmin(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerAdmin(playerid))
{
new sendername[MAX_PLAYER_NAME];
new giveplayername[MAX_PLAYER_NAME];
new giveplayerid,level;
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayername, sizeof(giveplayername));
if (!sscanf(params, "ii", giveplayerid,level))
{
if (giveplayerid != INVALID_PLAYER_ID)
{
new string[128];
format(string, sizeof(string), "The admin %s has made you a level %d admin",sendername,level);
SendClientMessage(giveplayerid, COLOR_GRAD1, string);
format(string, sizeof(string), "You have made %s a level %d admin",giveplayername,level);
SendClientMessage(playerid, COLOR_GRAD1, string);
pInfo[giveplayerid][Admin] = level;
}
}
else SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /setadmin [playerid] [level] 1-5");
}
else SendClientMessage(playerid, 0xFF0000FF, "You are not a owner Admin!");
}
return 1;
}