28.08.2012, 20:22
Hello, I've bought a custom script from some one and i have problem on it.
When i buy a lock from lock store, My car disappeared and when i use /tv it's giving me wrong mark.
Can some one fix it?
/buylock cmd.
When i buy a lock from lock store, My car disappeared and when i use /tv it's giving me wrong mark.
Can some one fix it?
Код:
if(strcmp(cmd, "/tracevehicle", true) == 0 || strcmp(cmd, "/tv", true) == 0) { new carname1[256]; new carname2[256]; new carname3[256]; new carname4[256]; new carname5[256]; if(PlayerInfo[playerid][PlayerVehicleModel1] != 0) { strmid(carname1, vehName[PlayerInfo[playerid][PlayerVehicleModel1]-400], 0, strlen(vehName[PlayerInfo[playerid][PlayerVehicleModel1]-400]), 255); } else { carname1 = "Empty"; } if(PlayerInfo[playerid][PlayerVehicleModel2] != 0) { strmid(carname2, vehName[PlayerInfo[playerid][PlayerVehicleModel2]-400], 0, strlen(vehName[PlayerInfo[playerid][PlayerVehicleModel2]-400]), 255); } else { carname2 = "Empty"; } if(PlayerInfo[playerid][PlayerVehicleModel3] != 0) { strmid(carname3, vehName[PlayerInfo[playerid][PlayerVehicleModel3]-400], 0, strlen(vehName[PlayerInfo[playerid][PlayerVehicleModel3]-400]), 255); } else { carname3 = "Empty"; } if(PlayerInfo[playerid][PlayerVehicleModel4] != 0) { strmid(carname4, vehName[PlayerInfo[playerid][PlayerVehicleModel4]-400], 0, strlen(vehName[PlayerInfo[playerid][PlayerVehicleModel4]-400]), 255); } else { carname4 = "Empty"; } if(PlayerInfo[playerid][PlayerVehicleModel5] != 0) { strmid(carname5, vehName[PlayerInfo[playerid][PlayerVehicleModel5]-400], 0, strlen(vehName[PlayerInfo[playerid][PlayerVehicleModel5]-400]), 255); } else { carname5 = "Empty"; } format(string,sizeof(string),"%s\n%s\n%s\n%s\n%s",carname1,carname2,carname3,carname4,carname5); ShowPlayerDialog(playerid,11111,DIALOG_STYLE_LIST,"Trace Vehicle",string,"Trace","Cancel"); return 1; }
Код:
if(strcmp(cmd, "/buylock", true) == 0) { if(BizzInfo[PlayerInfo[playerid][InBusiness]][bType] != 10) { SendClientMessage(playerid, COLOR_GREY, "You are not at A Locks Store!"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { format(string,sizeof(string),"Industrial Lock - 5000$\nElectrical Lock - 10,000$"); ShowPlayerDialog(playerid,MAIN_LOCK_DIALOG,DIALOG_STYLE_LIST,"Vehicle Lock Types.",string,"Proceed","Cancel"); } else { SendClientMessage(playerid,COLOR_GREY," You are not at any Locks Store."); } return 1; }