Questions. -
_Khaled_ - 29.08.2012
pawn Код:
dcmd_v(playerid,params[])
{
#pragma unused params
new vehid;
new color1;
new color2;if(sscanf(params,"i",vehid,color1,color2)) return SendClientMessage(playerid, COLOR_ERROR, "Usage: /v [vehicleid] [color1] [color2]");
new Float:x,Float:y,Float:z,Float:ang;
GetPlayerFacingAngle(playerid,ang);
GetPlayerPos(playerid,x,y,z);
CreateVehicle(vehid,x+1,y+1,z+1,ang,color1,color2,60);
return 1;
}
It spawns all cars ID 0, Black.
ANOTHER QUESTION:
pawn Код:
dcmd_gps(playerid,params[])
{
#pragma unused params
if(GPS_Activated[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "[GPS] Your GPS is already on.");
if(!IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COLOR_RED, "[GPS] You must be in a vehicle to use this command.");
GPS_Activated[playerid] = 0;
}
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COLOR_GREEN,"[GPS] You have turned on your GPS.");
ShowPlayerDialog(playerid, 99, DIALOG_STYLE_LIST, "GPS:", gpsstr, "Choose", "Cancel");
GPS_Activated[playerid] = 1;
}
return 1;
}
//============================================================================//
dcmd_gpsoff(playerid,params[])
{
#pragma unused params
if(GPS_Activated[playerid] == 0) return SendClientMessage(playerid, COLOR_RED, "[GPS] Your GPS is already off.");
if(GPS_Activated[playerid] == 1)
{
DisablePlayerCheckpoint(playerid);
SendClientMessage(playerid, COLOR_GREEN, "[GPS] You have turned off your GPS.");
GPS_Activated[playerid] = 0;
}
return 1;
}
It's not showing the dialog.
Everything is defined, and no compiling error.
Re: Questions. -
[MM]RoXoR[FS] - 29.08.2012
pawn Код:
ShowPlayerDialog(playerid, 99, DIALOG_STYLE_LIST, "GPS:", gpsstr, "Choose", "Cancel");
Show gpsstr
FIXED sscanf
pawn Код:
dcmd_v(playerid,params[])
{
#pragma unused params
new vehid;
new color1;
new color2;
if(sscanf(params,"iii",vehid,color1,color2)) return SendClientMessage(playerid, COLOR_ERROR, "Usage: /v [vehicleid] [color1] [color2]");
new Float:x,Float:y,Float:z,Float:ang;
GetPlayerFacingAngle(playerid,ang);
GetPlayerPos(playerid,x,y,z);
CreateVehicle(vehid,x+1,y+1,z+1,ang,color1,color2,60);
return 1;
}
Re: Questions. -
_Khaled_ - 29.08.2012
pawn Код:
//Public OnFilterScriptInit
public OnFilterScriptInit()
{
AddGPS("Las Venturas Police Departement", 2289.99,2418.84,10.39);
AddGPS("Las Venturas Fuckyea.", 2289.99,2418.84,10.39);
for(new i = 0; i < GPS+1; ++i)
{
if(i != 0)
{
if(i == 1) format(gpsstr,256,"%s\n",GPSInfo[i][gName]);
if(i != 1) format(gpsstr,256,"%s%s\n",gpsstr,GPSInfo[i][gName]);
}
}
return 1;
}
Re: Questions. -
romas3110 - 29.08.2012
pawn Код:
dcmd_v(playerid,params[])
{
#pragma unused params
new vehid,color1,color2,vid;
if(sscanf(params,"iii",vehid,color1,color2)) return SendClientMessage(playerid, COLOR_ERROR, "Usage: /v [vehicleid] [color1] [color2]");
new Float:x,Float:y,Float:z,Float:ang;
GetPlayerFacingAngle(playerid,ang);
GetPlayerPos(playerid,x,y,z);
vid = CreateVehicle(vehid,x,y,z,ang,color1,color2,60);
PutPlayerInVehicle(playerid, vid, 0);
return 1;
}
Just to add to that, ive added so when you spawn the vehicle it automatically places you as driver...
, i havent tested it, but it should work
Re: Questions. -
_Khaled_ - 29.08.2012
bump. Someone can help with the gpsstr?
Re: Questions. -
romas3110 - 29.08.2012
What does the GPS do exactly ?
Re: Questions. -
_Khaled_ - 29.08.2012
http://forum.sa-mp.com/showthread.ph...73#post2080873
Re: Questions. -
_Khaled_ - 29.08.2012
bump, anyone?