SA-MP Forums Archive
level system flip car command help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: level system flip car command help (/showthread.php?tid=386677)



Flip car command not working! - fireboy - 21.10.2012

pawn Код:
//1.LĪMENIS
if(GetPlayerScore(playerid) >= 1)

              {
    if(!strcmp(cmdtext, "/repaircar", true, 4))
        {
        if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "KĻŪDA:Tev jābūt maљīnā!");
        {
        new vehicleid = GetPlayerVehicleID(playerid);
        SetVehicleHealth(vehicleid, 1000.0);
        }
        SendClientMessage(playerid, 0x00CC00FF, "Tava maљīna salabota!");
        return 1;
        }

       





//===================================================================================================================//
//2.LĪMENIS
    if(GetPlayerScore(playerid) >= 2)
    {
    if(!strcmp(cmdtext, "/flipcar", true, 4))
    {
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "Tev jaatrodas transportaliidzekli.");
    {
    new maha;
    new Float:angle;
    maha = GetPlayerVehicleID(playerid);
    GetVehicleZAngle(maha, angle);
    SetVehicleZAngle(maha, angle);
    }
    return 1;
    }
    }
    return 0;
    }
    }
no errors, all okey, but ingame flipcar command is not working. whats wrong?
repaircar is okey, working.


Re: level system flip car command help - Abhishek. - 21.10.2012

chage your command to
Код:
    if(!strcmp(cmdtext, "/flipcar", true, 4))
    {    
if(GetPlayerScore(playerid) >= 2)
    {
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "Tev jaatrodas transportaliidzekli.");
    new maha;
    new Float:angle;
    maha = GetPlayerVehicleID(playerid);
    GetVehicleZAngle(maha, angle);
    SetVehicleZAngle(maha, angle);
    }
    else
   {
    SendClientMessage(playerid, -1, "ERROR:you need Score 2or more than 2 to use this command");
    }
    return 1;
    }



Re: level system flip car command help - fireboy - 21.10.2012

Quote:
Originally Posted by [bot]fatninja
Посмотреть сообщение
thanks, it's working now. but how can i add this:
SendClientMessage(playerid, 0x00CC00FF, "Your car sucesfully flipped!");


Re: level system flip car command help - RedJohn - 21.10.2012

Код:
if(!strcmp(cmdtext, "/flipcar", true, 4))
    {    
if(GetPlayerScore(playerid) >= 2)
    {
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "Tev jaatrodas transportaliidzekli.");
    new maha;
    new Float:angle;
    maha = GetPlayerVehicleID(playerid);
    GetVehicleZAngle(maha, angle);
    SetVehicleZAngle(maha, angle);
    SendClientMessage(playerid, 0x00CC00FF, "Your car sucesfully flipped!");
    }
    else
   {
    SendClientMessage(playerid, -1, "ERROR:you need Score 2or more than 2 to use this command");
    }
    return 1;
    }



Re: level system flip car command help - fireboy - 21.10.2012

hehe, thanks, but it shows me that i need 2 or more score

( SendClientMessage(playerid, -1, "ERROR:you need Score 2or more than 2 to use this command"); )


Re: level system flip car command help - fireboy - 22.10.2012

all okey, fixed myself.