13.04.2017, 14:26
mm can u tell me how this will be in my /resetcar command
this should show me the player cars
PHP код:
CMD:resetcar(playerid, params[])
{
new tmp[256], tmp1[256], name[MAX_PLAYER_NAME], string[256], string2[256], tvar, tvar1, dia[256];
if(pvehicle[playerid][0]==0 && pvehicle[playerid][1]==0) return SendClientMessage(playerid, COLOR_RED, "ERROR:You Dont Own Any Vehicle");
GetPlayerName(playerid, name, sizeof(name));
if(pvehicle[playerid][0]!=0)
{
format(string, 50, "V_%s", name);
tvar = dini_Int(AddDirFile(dir_carfiles, string), "model");
format(tmp, sizeof(tmp), "Reset Your: %s", tvar-400);
}
if(pvehicle[playerid][1]!=0)
{
format(string, 50, "V1_%s", name);
tvar1 = dini_Int(AddDirFile(dir_carfiles, string), "model");
format(tmp1, sizeof(tmp1), "Reset Your: %s", tvar1-400);
}
format(dia, sizeof(dia), "%s\n%s", tmp, tmp1);
ShowPlayerDialog2(playerid, DIALOG_RES_CAR, DIALOG_STYLE_TABLIST_HEADERS, "Select An Car To Reset", dia, "Select", "Cancel");
return 1;
}