getjob cmd help
#1

even when im in range of a job point,it says im not in range of a job point and i have a job in the data base with the coordonates saved,i don't know what's wrong with my command,this is the command and the load function


CMD:getjob(playerid, params[]){

if(PlayerInfo[playerid][pJob] != 0)
return SendClientMessage(playerid, COLOR_GREY, "You already have a job");

for(new i = 1; i <= MAX_JOBS; i++)
{
if(!IsPlayerInRangeOfPoint(playerid, 3.0, JobInfo[i][jPosX], JobInfo[i][jPosY], JobInfo[i][jPosZ]))
return SendClientMessage(playerid, COLOR_GREY, "You aren't in range of any job point");
}
return 1;
}


function LoadJobs() {
new
Cache: db = mysql_query (mysql, "SELECT * FROM `jobs` ORDER BY `jobs`.`ID` ASC"),
x, jobs, result[180], string[180];

for (new i, j = cache_get_row_count (); i != j; ++i) {
jobs ++;
cache_get_field_content(i, "ID", result); x = strval(result);
cache_get_field_content(i, "Name", result); format(JobInfo[x][jName], 128, result);
//cache_get_field_content(i, "NeedLevel", result); JobInfo[x][jLevel] = strval(result);
cache_get_field_content(i, "PosX", result); JobInfo[x][jPosX] = floatstr(result);
cache_get_field_content(i, "PosY", result); JobInfo[x][jPosY] = floatstr(result);
cache_get_field_content(i, "PosZ", result); JobInfo[x][jPosZ] = floatstr(result);
}
printf("Jobs: %d", jobs);
cache_delete(db);
return 1;
}
Reply


Messages In This Thread
getjob cmd help - by bosmania - 08.03.2019, 15:21
Re: getjob cmd help - by TheToretto - 08.03.2019, 15:38
Re: getjob cmd help - by bosmania - 09.03.2019, 08:46
Re: getjob cmd help - by v1k1nG - 09.03.2019, 10:28
Re: getjob cmd help - by bosmania - 09.03.2019, 10:37
Re: getjob cmd help - by v1k1nG - 09.03.2019, 10:39
Re: getjob cmd help - by TheToretto - 09.03.2019, 10:41
Re: getjob cmd help - by v1k1nG - 09.03.2019, 10:51
Re: getjob cmd help - by bosmania - 09.03.2019, 11:02
Re: getjob cmd help - by v1k1nG - 09.03.2019, 11:06
Re: getjob cmd help - by bosmania - 09.03.2019, 11:08
Re: getjob cmd help - by TheToretto - 09.03.2019, 11:09
Re: getjob cmd help - by bosmania - 09.03.2019, 11:15
Re: getjob cmd help - by v1k1nG - 09.03.2019, 15:02
Re: getjob cmd help - by TheToretto - 09.03.2019, 15:04
Re: getjob cmd help - by v1k1nG - 09.03.2019, 15:12
Re: getjob cmd help - by TheToretto - 09.03.2019, 17:12
Re: getjob cmd help - by v1k1nG - 09.03.2019, 18:26

Forum Jump:


Users browsing this thread: 2 Guest(s)