I need ONE HELP.. Please
#1

Quote:

public OnPlayerCommandText(playerid, cmdtext[]) {
new
cmd[256], tmp[256], idx,
p_name[MAX_PLAYER_NAME], o_name[MAX_PLAYER_NAME]
;
cmd = strtok(cmdtext, idx);
if(strcmp("/dlicense", cmd, true) == 0) {
tmp = strtok(cmdtext,idx);
if(!strlen(tmp)) return SendClientMessage(playerid, -1, "USAGE: /dlicense [ID]");
new ID = strval(tmp);
if(ID == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "SERVER: playerid isn't connected!");
GetPlayerName(ID, o_name, sizeof(o_name));
GetPlayerName(playerid, p_name, sizeof(p_name));
//Do your code here, getting the playerid his INI file and checking if he owns a LICENSE!
printf("LICENSE: [%d]%s showed [%d]%s his license.", playerid, p_name, ID, o_name);
return 1;
}
return 0;
}

stock strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}

new offset = index;
new result[20];
while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}

What code i must write there? Where is typed: //Do your code here, getting the playerid his INI file and checking if he owns a LICENSE!
Please?
Reply
#2

Someone?
Reply
#3

ur not allowed 2 post ur title as that
this is from the rules
Quote:

a) Use a proper subject
Something like '------------>HELP PLZ FAST NOW HELP!!!!!!!!!!!<----------' is not very descriptive and very annoying.
Make a proper subject with a short description, such as 'Gates won't open' or 'Game crashes instantly'

Reply
#4

Ok, sorry, i'll change, please Delete this thread
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)