- 0
problema la comanda /carcolor
-
Similar Content
-
- 4 replies
- 172 views
-
- 1 reply
- 134 views
-
- 4 answers
- 657 views
-
Comanda /spec
By VAurel,
- 4 answers
- 306 views
-
- 1 reply
- 49 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
Question
AddisoN
Nick: AddisoN
Problem? întâlnit?: Folosec comanda carcolor, imi schimba culorile masinii dar daca dau restart nu face update in baza de date si gand intru din nou o gasesc neagra(in baza de date imi ramane mereu 0 la ambele culori)
Erori / warnings: nu am in script
Lini/script: -
Ai incercat sa rezolvi singur ?:Da dar nu am reusit
Asta e comanda creata de mine.
[pawn]ocmd:carcolor(playerid, params[])
{
for(new i=0; i<sizeof(cInfo);i++)
{
new incar = IsPlayerInAnyVehicle(playerid);
new cowner = cInfo[owner];
new c1=cInfo[c_c1];
new c2=cInfo[c_c2];
if(!cowner) SCM(playerid,RED,"Nu ai masina!");
if(!incar) return SCM(playerid,RED,"Trebuie sa fii in masina!");
if(sscanf(params,"dD",c1,c2)) return SendClientMessage(playerid, -1, "INFO: /colorcar [color1] [color2]");
if(c1<0||c1>127)return SendClientMessage(playerid,RED,"Invalid id color one.");
if(c2<0||c2>127)return SendClientMessage(playerid,RED,"invalid id color two.");
new query[128],string[128];
format(query,sizeof(query),"UPDATE cars SET color1='%i',color2,='%i'WHERE id='%i'",cInfo[c_c1],cInfo[c_c2],cInfo[db_id]);
mysql_function_query(dbhandle,query,false,"","");
format(string, sizeof(string), "You have change the vehicle's color 1 to %d and color 2 to %d!",c1,c2);
SendClientMessage(playerid, RED, string);
ChangeVehicleColor(cInfo[id_x],c1,c2);
return 1;
}
return 1;
}[/pawn]
Multumesc anticipat!
Link to comment
Share on other sites
12 answers to this question
Recommended Posts