29.08.2012, 11:02
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;
}
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;
}
Everything is defined, and no compiling error.