Some Problems
#1

Hello,
I've some Problems.
first i use an GF
now here my problems
1. Some Bikes doesnt respawn
2. ./megaphone works in a police car. but when i leave the car i can make ./megaphone. it must be only in a car
3. 1 car in everey faction doesnt work

codes
1. new NoobRoller[12];
forward IsANoobBike(carid);
public IsANoobBike(carid)
{
for(new i = 0; i < sizeof(NoobRoller); i++)
{
if(carid == NoobRoller[i])
{
return 1;
}
}
return 0;
}

OnGameModeInit
NoobRoller[0]=AddStaticVehicleEx(462,1120.56054688,-1475.15539551,15.46709442,0.00000000,-1,-1,60000); //Faggio
NoobRoller[1]=AddStaticVehicleEx(462,1120.47985840,-1480.18090820,15.46709442,0.00000000,-1,-1,60000); //Faggio
NoobRoller[2]=AddStaticVehicleEx(462,1120.59765625,-...


OnPlayerStateChange
if(IsANoobBike(newcar))
{
}

2.
new FbiCars[21];
forward IsAFbiCar(carid);
public IsAFbiCar(carid)
{
for(new i = 0; i < sizeof(FbiCars); i++)
{
if(carid == FbiCars[i])
{
return 1;
}
}
return 0;
}

ongamemodeinit
FbiCars[0]=AddStaticVehicleEx(415,983.85302734,1155.42651367 ,10.66983414,180.00000000,0,0,-1); //Cheetah
...

onplayercommandtext
if(strcmp(cmd, "/megaphone", true) == 0 || strcmp(cmd, "/m", true) == 0)
{
if(IsPlayerConnected(playerid)) {
new tmpcar = GetPlayerVehicleID(playerid);
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "Verwendung: (/m)egaphone [megaphone chat]");
return 1;
}
if(IsACop(playerid) || IsAMedic(playerid))
{
if(IsACopCar(tmpcar) || IsAFbiCar(tmpcar) || IsAArmyCar(tmpcar) || IsAMayorCar(tmpcar) || IsAMedicCar(tmpcar))
{
if(PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pLeader] == 1)
{
format(string, sizeof(string), "[Polizist %s: %s]", sendername, result);
ProxDetector(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLO R_YELLOW,COLOR_YELLOW);
}
else if(PlayerInfo[playerid][pMember] == 2||PlayerInfo[playerid][pLeader] == 2)
{
format(string, sizeof(string), "[Agent %s: %s]", sendername, result);
ProxDetector(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLO R_YELLOW,COLOR_YELLOW);
}
else if(PlayerInfo[playerid][pMember] == 3||PlayerInfo[playerid][pLeader] == 3)
{
format(string, sizeof(string), "[Soldat %s: %s]", sendername, result);
ProxDetector(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLO R_YELLOW,COLOR_YELLOW);
}
else if(PlayerInfo[playerid][pMember] == 4||PlayerInfo[playerid][pLeader] == 4)
{
format(string, sizeof(string), "[Sanitдter %s: %s]", sendername, result);
ProxDetector(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLO R_YELLOW,COLOR_YELLOW);
}
printf("%s", string);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, " Du bist in keinem Staatsfahrzeug !");
return 1;
}

}
else
{
SendClientMessage(playerid, COLOR_GRAD2, " Du bist kein Polizist !");
return 1;
}
}
return 1;
}

and 3.

new LSPDCars[36];
forward IsACopCar(carid);

public IsACopCar(carid)
{
for(new i = 0; i < sizeof(LSPDCars); i++)
{
if(carid == LSPDCars[i])
{
return 1;
}
}
return 0;
}

Ongamemodeinit
LSPDCars[0]=AddStaticVehicleEx(596,1601.16735840,-1684.26647949,5.71062469,90.00000000,0,1,-1); //Police Car (LSPD)

...
(1 faction car doenst work i dont know why)

can someone help me?
Reply
#2

fixxed ^^
please close
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)