06.02.2011, 12:01
hello, i tried to do a job system just to test but i know i did something wrong with the sscanf i dont understand it much
here
please tell me how
here
pawn Код:
COMMAND:job(playerid, params[])
{
if(GetPlayerInterior(playerid) == 1)
if(sscanf(params, "d", params)) return SendClientMessage(playerid, Yellow, "Usage: /job <job name>");
if (!strcmp("Police", params, true)) if(GetPlayerJobID(playerid) == 0)
{
new name[MAX_PLAYER_NAME], file[128];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file), SERVER_USER_FILE, name);
RemoveJob(playerid);
SetJob(playerid,1);
PlayerInfo[playerid][pJob] = dini_Int(file, "Job");
}
return 1;
}