Advertisement
Guest User

Untitled

a guest
Jul 30th, 2019
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1.  
  2. switch(dialogid)
  3. {
  4. case DIALOG_VIPNAME:
  5. {
  6. if(!response) return true;
  7.  
  8. new carid = GetPlayerVehicleID(playerid), idcar = -1;
  9.  
  10. for(new vv; vv < MAX_PERSONAL_VEHICLES; vv++)
  11. {
  12. if(carid == PlayerInfo[playerid][pCarID][vv]) idcar = vv;
  13. }
  14.  
  15. if(carid == PlayerInfo[playerid][pCarID][idcar] && PlayerInfo[playerid][pCarVIP][idcar] > 0)
  16. {
  17. new string[128];
  18.  
  19. format(CarVipName[playerid][idcar], 20, inputtext);
  20. SetVipText(playerid, idcar);
  21.  
  22. mysql_format(SQL, string, sizeof string, "UPDATE `cars` SET `VipText` = '%s' WHERE `ID` = '%d' LIMIT 1", inputtext, PlayerInfo[playerid][pCar][idcar]);
  23. mysql_tquery(SQL, string, "", "");
  24.  
  25. format(string, sizeof string, "Text pentru vehicul setat: %s.", inputtext);
  26. SCM(playerid, -1, string);
  27. }
  28. }
  29. }
  30.  
  31. CMD:vipname(playerid, params[])
  32. {
  33. if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid, -1, "Nu te afli intr-un vehicul.");
  34.  
  35. ShowPlayerDialog(playerid, DIALOG_VIPNAME, DIALOG_STYLE_INPUT, "VIP NAME", "Scrie textul vip mai jos:", "Done", "Exit");
  36.  
  37. return true;
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement