Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:vipname(playerid, params[], help) {
- if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid, COLOR_GREY, "Nu esti in vehiculul tau!");
- new car = GetPlayerVehicleID(playerid);
- if(GetVehicles(playerid) == 0) return SCM(playerid, COLOR_LGREEN, "Eroare: Nu ai un vehicul personal!");
- if(PersonalCar(playerid) == -1) return SCM(playerid, COLOR_LGREEN, "Eroare: Nu esti in unul dintre vehiculele tale personale!");
- new idd = PersonalCar(playerid);
- if(CarInfo[idd][Spawned] != car) return SCM(playerid, COLOR_GREY, "Nu esti in vehiculul tau.");
- if(idd == 0) return SCM(playerid, COLOR_WHITE, "Acest vehicul nu iti apartine!");
- if(strlen(CarInfo[idd][cText]) < 3) return SCM(playerid, -1, "Acest vehicul nu este unul VIP!");
- new result[32];
- if(sscanf(params, "s[32]",result)) {
- SCM(playerid, COLOR_GREY, "USAGE: {FFFFFF}/vipname <name>");
- return 1;
- }
- if(strfind(result, "'", true) != -1 || strfind(result, "Model", true) != -1 || strfind(result, "`", true) != -1) return SCM(playerid, -1, "Caractere invalide!");
- if(strlen(result) < 3 || strlen(result) > 15) return SCM(playerid, COLOR_GREY, "Poti pune un text ce are minim 3 caractere si maxim 15.");
- if(strlen(CarInfo[idd][cText]) >= 3) DestroyDynamicObject(nameobject[CarInfo[idd][Spawned]]);
- format(CarInfo[idd][cText], 256, result);
- attach_vip_text(idd);
- new query[256], string[180];
- format(query, sizeof(query), "UPDATE `cars` SET `Text`='%s' WHERE `ID`='%d'", result, idd);
- mysql_query(SQL, query);
- format(string, sizeof(string), "Numele de pe spatele vehiculului este '%s'", result);
- SCM(playerid, COLOR_MONEY, string);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement