1.(190) : error 029: invalid expression, assumed zero
1.(190) : warning 215: expression has no effect
1.(190) : error 001: expected token: ";", but found "if"
2.(260) : error 029: invalid expression, assumed zero
2.(260) : warning 215: expression has no effect
2.(260) : error 001: expected token: ";", but found "if"
if (!strcmp (cmdtext, "/speedcam"))
{
if(!IsAPoliceman(playerid))return SendClientMessage(playerid, COLOR_YELLOW, "TEXT HERE!");
{
if(!IsLeoVehicle(GetPlayerVehicleID(playerid)))return SendClientMessage (playerid, COLOR_YELLOW, "TEXT HERE!");
{
new vehid = GetPlayerVehicleID (playerid);
if (VehRadarID [vehid] > -1) return 1;
new Float: x, Float: y, Float: z, Float: a;
GetVehiclePos (vehid, x, y, z);
GetVehicleZAngle (vehid, a);
SendClientMessage (playerid, COLOR_YELLOW, "TEXT HERE!");
VehRadarID [vehid] = CreateObject (367, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 300.0);
AttachObjectToVehicle (VehRadarID [vehid], vehid, 0.2, 0.50, 0.3, 0.0, 0.0, 90.0);
for (new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerInVehicle (i, vehid))
{
TextDrawShowForPlayer(i, Text:RadarHud);
TextDrawShowForPlayer(i, Text:ArkaPlan0);
TextDrawShowForPlayer(i, Text:ArkaPlan1);
TextDrawShowForPlayer(i, Text:ArkaPlan2);
TextDrawShowForPlayer(i, Text:ArkaPlan3);
TextDrawShowForPlayer(i, Text:ArkaPlan4);
}
}
}
else if(!IsSultanVehicle(GetPlayerVehicleID(playerid)))return SendClientMessage (playerid, COLOR_YELLOW, "TEXT HERE!"); // <--------- Here is the first(1) Problem!
{
new vehid = GetPlayerVehicleID (playerid);
if (VehRadarID [vehid] > -1) return 1;
new Float: x, Float: y, Float: z, Float: a;
GetVehiclePos (vehid, x, y, z);
GetVehicleZAngle (vehid, a);
SendClientMessage (playerid, COLOR_YELLOW, "TEXT HERE!");
VehRadarID [vehid] = CreateObject (367, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 310.0);
AttachObjectToVehicle (VehRadarID [vehid], vehid, 0.2, 0.50, 0.3, 0.0, 0.0, 90.0);
for (new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerInVehicle (i, vehid))
{
TextDrawShowForPlayer(i, Text:RadarHud);
TextDrawShowForPlayer(i, Text:ArkaPlan0);
TextDrawShowForPlayer(i, Text:ArkaPlan1);
TextDrawShowForPlayer(i, Text:ArkaPlan2);
TextDrawShowForPlayer(i, Text:ArkaPlan3);
TextDrawShowForPlayer(i, Text:ArkaPlan4);
}
}
}
}
return 1;
}
else if(!IsSultanVehicle(GetPlayerVehicleID(playerid)))return SendClientMessage (playerid, COLOR_YELLOW, "TEXT HERE!"); // <--------- Here is the first(1) Problem!
if (!strcmp (cmdtext, "/turnspeedcam"))
{
if(!IsAPoliceman(playerid))return SendClientMessage(playerid, COLOR_YELLOW, "TEXT HERE!");
{
if(!IsLeoVehicle(GetPlayerVehicleID(playerid)))return SendClientMessage (playerid, COLOR_YELLOW, "TEXT HERE!");
{
new vehid = GetPlayerVehicleID (playerid);
if (VehRadarID [vehid] == -1) return 1;
CheckingSpeed [vehid] = SetTimerEx ("UpdateSpeed", 100, 1, "d", vehid);
}
else if(!IsSultanVehicle(GetPlayerVehicleID(playerid)))return SendClientMessage (playerid, COLOR_YELLOW, "TEXT HERE!"); //<-------- Here is the second(2) problem!
{
new vehid = GetPlayerVehicleID (playerid);
if (VehRadarID [vehid] == -1) return 1;
CheckingSpeed [vehid] = SetTimerEx ("UpdateSpeed", 100, 1, "d", vehid);
}
}
return 1;
}
else if(!IsSultanVehicle(GetPlayerVehicleID(playerid)))return SendClientMessage (playerid, COLOR_YELLOW, "TEXT HERE!"); //<-------- Here is the second(2) problem!
stock IsLeoVehicle(vehicleid)
{
switch(GetVehicleModel(vehicleid))
{
case 599,598,597,596,490: return 1;
}
return 0;
}
stock IsSultanVehicle(vehicleid)
{
switch(GetVehicleModel(vehicleid))
{
case 560: return 1;
}
return 0;
}
stock IsAPoliceman(playerid)
{
switch(GetPlayerSkin(playerid))
{
case 288,284,283,282,281,280,267,266,265,71: return 1;
}
return 0;
}
else if(!IsSultanVehicle(GetPlayerVehicleID(playerid)))return SendClientMessage (playerid, COLOR_YELLOW, "TEXT HERE!"); // <--------- Here is the first(1) Problem!
if(!IsSultanVehicle(GetPlayerVehicleID(playerid))) << over here. Take one bracket out, which will look like this.
if(!IsSultanVehicle(GetPlayerVehicleID(playerid)) - after
if(!IsSultanVehicle(GetPlayerVehicleID(playerid))) - before
else if(!IsSultanVehicle(GetPlayerVehicleID(playerid)))return SendClientMessage (playerid, COLOR_YELLOW, "TEXT HERE!"); - before
else if(!IsSultanVehicle(GetPlayerVehicleID(playerid))return SendClientMessage (playerid, COLOR_YELLOW, "TEXT HERE!"); after
pawn Код:
Код:
if(!IsSultanVehicle(GetPlayerVehicleID(playerid))) << over here. Take one bracket out, which will look like this. pawn Код:
Delete one bracket. pawn Код:
|
else if(!IsSultanVehicle(GetPlayerVehicleID(playerid)))
1. 2. 3. 1.2.3
new vehid = GetPlayerVehicleID (playerid);
if (VehRadarID [vehid] > -1)
{
new Float: x, Float: y, Float: z, Float: a;
..........................
.......................
return 1;
}
//========================================
if (VehRadarID [vehid] == -1)
{
CheckingSpeed [vehid] = SetTimerEx ("UpdateSpeed", 100, 1, "d", vehid);
return 1;
}
//======================================
//======================================
else if(!IsSultanVehicle(GetPlayerVehicleID(playerid))) return SendClientMessage(playerid, COLOR_YELLOW, "TEXT HERE!");
else if(!IsSultanVehicle(GetPlayerVehicleID(playerid))) return SendClientMessage(playerid, COLOR_YELLOW, "TEXT HERE!");