Little help please, thanks.
#1

Код:
loadOwnedCarToys(carid) {
	new sqlid = GetVehicleSQLID(carid);
	if(sqlid == -1) return 0;
	format(query, sizeof(query), "SELECT `X`,`Y`,`Z`,`RX`,`RY`,`RZ`,`id`,`toyidx` FROM `playercartoys` WHERE `carid` = %d",sqlid);
	mysql_function_query(g_mysql_handle, query, true, "OnLoadCarToys", "d",carid);
	return 1;
}
forward OnLoadCarToys(carid);
public OnLoadCarToys(carid) {
	new toyidx, Float:X, Float:Y, Float:Z, Float:RX, Float:RY, Float:RZ;
Код:
YCMD:siren(playerid, params[], help) {
	new carid = GetPlayerVehicleID(playerid);
	if(carid == INVALID_VEHICLE_ID || GetPlayerState(playerid) != PLAYER_STATE_DRIVER) {
		SendClientMessage(playerid, X11_TOMATO_2, "* You must be in a vehicle!");
		return 1;
	}
	if(!IsAnLEO(playerid)) {
		SendClientMessage(playerid, X11_TOMATO_2, "You aren't a cop!");
		return 1;
	}
	if(!IsOnDuty(playerid)) {
		SendClientMessage(playerid, X11_TOMATO_2, "You are not on duty!");
		return 1;
	}
	AddVehicleCarToy(carid, 0, 1);
	return 1;
}
XYZ pos not saving for some reason , help please.
Reply


Messages In This Thread
Little help please, thanks. - by Puff - 27.08.2017, 07:07
Re: Little help please, thanks. - by Kane - 27.08.2017, 07:18
Re: Little help please, thanks. - by Puff - 27.08.2017, 07:27

Forum Jump:


Users browsing this thread: 1 Guest(s)