Command work but doesn't update.
#1

When I set one vehicle to different job it just didn't work even though the command work. The vehicle itself didn't update and still same and remains as civillian vehicle not some job (example like trucker job vehicle only).

Код:
  else if(!strcmp(tmp, "job", true, 3))
  {
      if(!IsPlayerInAnyVehicle(playerid)) return SendClientError(playerid, "You are not in any vehicle!");
      if(GetAdminLevel(playerid) < 10) return SendClientError(playerid, CANT_USE_CMD);
    if(!strlen(tmp2) || IsNumeric(tmp2) || strlen(tmp2) > MAX_PLAYER_NAME) return SCP(playerid, "job [name]");
    dini_Set(CarFile(GetPlayerVehicleID(playerid)), "jobname", tmp2);
    SendClientInfo(playerid, "Success: The job has been updated to this vehicle.");
    myStrcpy(Vehicles[GetPlayerVehicleID(playerid)][jobname], tmp2);
  }
Reply
#2

Which part doesnt work, dini_Set or myStrcpy?
Reply
#3

dini set
Reply
#4

CarFile codes ?
Reply
#5

Код:
else if(!strcmp(tmp, "job", true, 3))
  {
      if(!IsPlayerInAnyVehicle(playerid)) return SendClientError(playerid, "You are not in any vehicle!");
      if(GetAdminLevel(playerid) < 10) return SendClientError(playerid, CANT_USE_CMD);
    if(!strlen(tmp2) || IsNumeric(tmp2) || strlen(tmp2) > MAX_PLAYER_NAME) return SCP(playerid, "job [name]");
    dini_IntSet(CarFile(GetPlayerVehicleID(playerid)), "jobname", tmp2);
    SendClientInfo(playerid, "Success: The job has been updated to this vehicle.");
    myStrcpy(Vehicles[GetPlayerVehicleID(playerid)][jobname], tmp2);
  }
Reply
#6

You have a function called CarFile which i asked for it's codes. Not the cmd (that u already posted)
Reply
#7

Quote:
Originally Posted by mongi
Посмотреть сообщение
You have a function called CarFile which i asked for it's codes. Not the cmd (that u already posted)
It's not me who replied before. Anyway, fixed.
Reply
#8

Show your CarFile function, and go manually to scriptfiles and check if there is a file created "CarFile(GetPlayerVehicleID(playerid)", if its created check if the line "jobname" is set or not.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)