12.02.2013, 17:41
Код:
COMMAND:vmenu(playerid, params[]) { new string[1024],v,playername[MAX_PLAYER_NAME],vehvid=-1; if(IsPlayerInAnyVehicle(playerid)) vehvid=GetPlayerVehicleID(playerid); GetPlayerName(playerid, playername, sizeof(playername)); for(new vid=0;vid<MAX_VEHICLES;vid++) { if(strlen(playername)==strlen(VehicleInfo[vid][owner]) && !strcmp(playername,VehicleInfo[vid][owner],false,MAX_PLAYER_NAME)) { if(vid==0)format(string,sizeof(string),"%s - [Plate: %s]",string,VehicleNames[GetVehicleModel(vid)-400],VehicleInfo[vid][Plate]); else format(string,sizeof(string),"%s\n%s - [Plate: %s]",string,VehicleNames[GetVehicleModel(vid)-400],VehicleInfo[vid][Plate]); if(vid == vehvid)format(string,sizeof(string),"%s [{00FF00}•{FFFFFF}]",string); VmenuInfo[playerid][itemvid][v] = vid; v ++; } else VmenuInfo[playerid][itemvid][vid]=-1; if(v > 0){ ShowPlayerDialog(playerid, DIALOG_VMENU, DIALOG_STYLE_LIST, "Manage your vehicle", string, "Select", "Cancel"); } else SendClientMessage(playerid,-1,"[Error:] You don't have any vehicle"); } return 1; }
How can i fix it?