SA-MP Forums Archive
Question - 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: Question (/showthread.php?tid=471235)



Question - DarkLored - 22.10.2013

Hello
Can someone tell me how to make that if a Civilian enter
a cop car he will get wanted level like 4 stars

cause i dont know how to make one

Thanks,
DarkLored


Re: Question - Akira297 - 22.10.2013

Post this in scripting requests not inside of scripting help.


Re: Question - DarkLored - 22.10.2013

I am not requesting for a script i am requesting for help so i need to post it in Scripting help
so i posted where i needed i just want to know how do i make this


Respuesta: Question - [CG]Milito - 22.10.2013

pawn Код:
new definedcar;


OnGameModeInit()
{
    definedcar = CreateVehicle(blah,blah,blah,....);
    return 1;
}

OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
        if(GetPlayerVehicleID(playerid) == definedcar)
        {
            if(gTeam[playerid] != COPS)
            {
                new string[80];
                SendClientMessage(playerid,COLOR_RED,"__**CRIME**__{FFFFFF} You've stolen a police Vehicle.");
                format(string,sizeof(string),"{FF0000}__**CRIME**__{FFFFFF} %s[%i] Has stolen a police  Vehicle.",pname,playerid);
                SendClientMessage(-1,string);          
               SetPlayerWantedLevel(playerid,4);
               return 1;    
            }
        }
    }
    return 1;
}



Re: Question - DarkLored - 22.10.2013

I get this following errors and warning:
Код:
C:\Program Files (x86)\Microsoft Power\GTA San Andreas\TeamDeathMatch\gamemodes\CNR.pwn(583) : warning 215: expression has no effect
C:\Program Files (x86)\Microsoft Power\GTA San Andreas\TeamDeathMatch\gamemodes\CNR.pwn(584) : warning 215: expression has no effect
C:\Program Files (x86)\Microsoft Power\GTA San Andreas\TeamDeathMatch\gamemodes\CNR.pwn(585) : warning 215: expression has no effect
C:\Program Files (x86)\Microsoft Power\GTA San Andreas\TeamDeathMatch\gamemodes\CNR.pwn(586) : warning 215: expression has no effect
C:\Program Files (x86)\Microsoft Power\GTA San Andreas\TeamDeathMatch\gamemodes\CNR.pwn(587) : warning 215: expression has no effect
C:\Program Files (x86)\Microsoft Power\GTA San Andreas\TeamDeathMatch\gamemodes\CNR.pwn(588) : warning 215: expression has no effect
C:\Program Files (x86)\Microsoft Power\GTA San Andreas\TeamDeathMatch\gamemodes\CNR.pwn(589) : warning 215: expression has no effect
C:\Program Files (x86)\Microsoft Power\GTA San Andreas\TeamDeathMatch\gamemodes\CNR.pwn(590) : warning 215: expression has no effect
C:\Program Files (x86)\Microsoft Power\GTA San Andreas\TeamDeathMatch\gamemodes\CNR.pwn(591) : warning 215: expression has no effect
C:\Program Files (x86)\Microsoft Power\GTA San Andreas\TeamDeathMatch\gamemodes\CNR.pwn(592) : warning 215: expression has no effect
C:\Program Files (x86)\Microsoft Power\GTA San Andreas\TeamDeathMatch\gamemodes\CNR.pwn(593) : warning 215: expression has no effect
C:\Program Files (x86)\Microsoft Power\GTA San Andreas\TeamDeathMatch\gamemodes\CNR.pwn(594) : warning 215: expression has no effect
C:\Program Files (x86)\Microsoft Power\GTA San Andreas\TeamDeathMatch\gamemodes\CNR.pwn(595) : warning 215: expression has no effect
C:\Program Files (x86)\Microsoft Power\GTA San Andreas\TeamDeathMatch\gamemodes\CNR.pwn(596) : warning 215: expression has no effect
C:\Program Files (x86)\Microsoft Power\GTA San Andreas\TeamDeathMatch\gamemodes\CNR.pwn(597) : warning 215: expression has no effect
C:\Program Files (x86)\Microsoft Power\GTA San Andreas\TeamDeathMatch\gamemodes\CNR.pwn(598) : warning 215: expression has no effect
C:\Program Files (x86)\Microsoft Power\GTA San Andreas\TeamDeathMatch\gamemodes\CNR.pwn(602) : warning 215: expression has no effect
C:\Program Files (x86)\Microsoft Power\GTA San Andreas\TeamDeathMatch\gamemodes\CNR.pwn(603) : warning 215: expression has no effect
C:\Program Files (x86)\Microsoft Power\GTA San Andreas\TeamDeathMatch\gamemodes\CNR.pwn(2211) : error 076: syntax error in the expression, or invalid function call
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.



Respuesta: Question - [CG]Milito - 22.10.2013

Did you just copy the code? -.-'
You have to edit it by yourself, using your variables


Re: Question - DarkLored - 22.10.2013

No i edited it and i got these errors and i used AddStaticVehicle for that


Respuesta: Question - [CG]Milito - 22.10.2013

Then, Post the lines

Edit:

First Error I see on my code is this:


pawn Код:
definedcar == CreateVehicle(blah,blah,blah,....);
should be like this (Just one of this =)

pawn Код:
definedcar = CreateVehicle(blah,blah,blah,....);



Re: Question - DarkLored - 22.10.2013

I will post one line only
pawn Код:
definedcar = AddStaticVehicle (blabla)
The original line has its own settings I just posted a example
Because my brother is using my computer so I cant get the full code


Respuesta: Question - [CG]Milito - 22.10.2013

Make sure you typed it with one of these "=", In the code I gave you first, I made a mistake. I typed two = insted of 1.