- 0
ajutor, nu merge /vmove
-
Similar Content
-
- 2 answers
- 1,535 views
-
- 0 replies
- 89 views
-
- 4 replies
- 167 views
-
- 5 replies
- 373 views
-
- 4 replies
- 401 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
Question
I O B I T
CMD:vmove(playerid, params[])
{
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to log in first.");
if(PlayerInfo[playerid][pAdmin] >= 6)
{
new str[256];
for(new x = 0; x < MAX_VEHICLES; x++)
{
if(VehicleInfo[x][vehCarID] == GetPlayerVehicleID(playerid))
{
GetVehiclePos(VehicleInfo[x][vehCarID], VehicleInfo[x][vehPosX], VehicleInfo[x][vehPosY], VehicleInfo[x][vehPosZ]);
GetVehicleZAngle(VehicleInfo[x][vehCarID], VehicleInfo[x][vehRotation]);
mysql_format(SQL,str,sizeof(str),"UPDATE vehicles SET `PosX`='%f',`PosY`='%f',`PosZ`='%f',`Rotation`='%f' WHERE `ID`='%d'",VehicleInfo[x][vehPosX],VehicleInfo[x][vehPosY],VehicleInfo[x][vehPosZ],VehicleInfo[x][vehRotation],VehicleInfo[x][vehCarIDD]);
mysql_tquery(SQL,str,"","");
SendClientMessage(playerid, COLOR_YELLOW, "Vehicle position changed.");
return 1;
}
}
}
else return SendClientMessage(playerid, COLOR_LIGHTGREEN3, AdminOnly);
return 1;
}
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.