[pomoc]Brzinomjer

Započeo panameR., Jun 28, 2011, 18:07:16 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:  LARP
Detaljan opis problema:  Kako napravit da se brzinomjer automatski upaljuje cim udes u auto a ne da moras upisivat "/speedo"
Dio skripte:  if(strcmp(cmd, "/speedo", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
if(PlayerInfo[playerid][pSpeedo] == 1)
{
PlayerInfo[playerid][pSpeedo] = 2;
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~g~on", 5000, 5);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
}
else if(PlayerInfo[playerid][pSpeedo] == 2)
{
PlayerInfo[playerid][pSpeedo] = 1;
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~r~off", 5000, 5);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "Nemas Speedo-meter");
}
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /speedo",d,m,y,h,mi,s,sendername);
CommandLog(string);
}
return 1;
}
if(strcmp(cmd, "/fuel", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
if (gGas[playerid] == 0)
{
gGas[playerid] = 1;
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~g~Gorivo Info on", 5000, 5);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
}
else if (gGas[playerid] == 1)
{
gGas[playerid] = 0;
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~r~Gorivo Info off", 5000, 5);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
}
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /fuel",d,m,y,h,mi,s,sendername);
CommandLog(string);
}
return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno):
Respect: $--L84S--$, ναηιâ,,"â,,"α , BloodMaster , LuxZillo, Don_Sergio, ExtremePower, Gotti747, Gagi_

OnPlayerEnterVehicle?
Uskoro novi stunt server iStunt. DoÄ'ite i zabavite se!




   
   




Dizajniram za $$$
Popis stvari koje radim:

Wallpaper √  Signature ×  Logo √  Dizajn stranice (Ne kodiranje) √  Baner √  Avatar √  Animacija √  Intro √

Nisi mi nista reko, reci dje sta trebam stavit?
Respect: $--L84S--$, ναηιâ,,"â,,"α , BloodMaster , LuxZillo, Don_Sergio, ExtremePower, Gotti747, Gagi_

pa u OnPlayerEnterVehicle, daj ocu ti ja upast na komp pa taj kod iz /speedo staviti u oNpLAYEReNTERvEHICLE?
Uskoro novi stunt server iStunt. DoÄ'ite i zabavite se!




   
   




Dizajniram za $$$
Popis stvari koje radim:

Wallpaper √  Signature ×  Logo √  Dizajn stranice (Ne kodiranje) √  Baner √  Avatar √  Animacija √  Intro √

NaÄ'i:public Startup i zamjeni ga ovim
public Startup(playerid, vehicleid)
{
    new pveh = GetVehicleModel(GetPlayerVehicleID(playerid));
    new newcar = GetPlayerVehicleID(playerid);
if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER || engineOn[vehicleid])
{
//I do nothing!
}
else if(PlayerInfo[playerid][pAdminDuty] == 1)
{
    if(engineOn[vehicleid] == 0)
    {
    engineOn[vehicleid] = 1;
}
    TogglePlayerControllable(playerid, true);
}
else if(IsModelAPlane(vehicleid) || IsModelAHeli(vehicleid))
{
    if(engineOn[vehicleid] == 0)
    {
    engineOn[vehicleid] = 1;
}
    TogglePlayerControllable(playerid, true);
}
else if(IsPlayerInAnyVehicle(playerid) && !engineOn[vehicleid] && !vehicleEntered[playerid][vehicleid] && GetPlayerState(playerid) == PLAYER_STATE_DRIVER && pveh != 510 && pveh != 462 && newcar != 59 && newcar != 60 && !IsAHarvest(newcar) && !IsADrugHarvest(newcar) && !IsASweeper(newcar) )
{
SendClientMessage(playerid, COLOR_BLUE, "Stisni SHIFT da upalis motor vozila!");
TogglePlayerControllable(playerid, false);
vehicleEntered[playerid][vehicleid] = true;
PlayerInfo[playerid][pSpeedo] == 2);
if(IsModelABike(GetPlayerVehicleID(playerid)))
{
SendClientMessage(playerid, COLOR_LIGHT_BLUE, "Stavi kacigu [/kaciga] da ne dobijes kaznu");
}
else
{
SendClientMessage(playerid, COLOR_LIGHT_BLUE, "Zakaci pojas [/pojas] da ne dobijes kaznu");
}
}
else if(IsPlayerInAnyVehicle(playerid) && !engineOn[vehicleid] && vehicleEntered[playerid][vehicleid] && GetPlayerState(playerid) == PLAYER_STATE_DRIVER && pveh != 510 && pveh != 462 && newcar != 59 && newcar != 60 && !IsAHarvest(newcar) && !IsADrugHarvest(newcar) && !IsASweeper(newcar))
{
SendClientMessage(playerid, COLOR_LIGHT_BLUE, "Stisni SHIFT da upalis motor!!");
TogglePlayerControllable(playerid, false);
SendClientMessage(playerid, COLOR_LIGHT_BLUE, "Stavi [/kaciga] ili [/pojas] da ne dobijes kaznu!");
}
}

Eto,ako neradi javi u temi