04.01.2011, 17:31
Hello,
this is probably something I just overlooked.
Returns the strcmp part no mather what.
this is probably something I just overlooked.
pawn Код:
COMMAND:takejob(playerid, params[])
{
if(player[playerid][ajob] != 0) return SendClientMessage(playerid, COLOR_WHITE, "ERROR » You already have a job, use /quitjob first");
new job, accept[64], jobstring[128];
sscanf(params, "s[63]", accept);
printf("Parameters: %s", accept);
if(IsPlayerInRangeOfPoint(playerid, 10.0, 2512.4465,-1473.9086,24.8523)) // Mechanic NPC
{
if(strcmp(accept, "accept", true) == 0)
{
job = 1;
player[playerid][ajob] = job;
SavePlayerData(playerid, "ajob", player[playerid][ajob], 2);
format(jobstring, sizeof(jobstring), "NOTE » You are now a %s type /help for more information and perks.", ReturnJobName(job));
SendClientMessage(playerid, COLOR_YELLOW, jobstring);
printf("Woops, something went wrong!");
return 1;
}
else
{
printf("Is it actually working?!");
SendClientMessage(playerid, COLOR_WHITE, "Are you sure you want the job? Type /takejob confirm");
}
}
return 1;
}