crimes - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: crimes (
/showthread.php?tid=155560)
crimes -
Kar - 19.06.2010
how do i make it like there are random cars around sa if i randomly enter one it sends clientmessagetoall %s has commited a crime blah blah blah and sets wanted lvl 1-4+ >?
Re: crimes - TheInnocentOne - 19.06.2010
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
new string[128], pNick[20];
GetPlayerName(playerid, pNick, sizeof pNick);
format(string, sizeof string, "%s (%d) has stolen a vehicle!", pNick, playerid);
SendClientMessageToAll(0xFF0000FF, string);
switch(GetPlayerWantedLevel(playerid))
{
case 0, 1, 2, 3, 4: SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid) +2);
case 5, 6: SetPlayerWantedLevel(playerid, 6);
}
}
return 1;
}
Something like that anyway
Re: crimes -
Kar - 19.06.2010
thxs looks right i'll see what i can do
Re: crimes - TheInnocentOne - 19.06.2010
Sorry for the horrible indentation, every time I paste code it does that
Re: crimes -
Kar - 19.06.2010
dw. pragma tabsize 0
Re: crimes - TheInnocentOne - 19.06.2010
Lazy
Re: crimes -
Kar - 19.06.2010
so like i gotta put case 0:
ifvehicleid etc... then put sendclientmessage.
am i going right>?
Re: crimes -
Antonio [G-RP] - 19.06.2010
Quote:
Originally Posted by Kar
dw. pragma tabsize 0
|
NOOB!
Re: crimes - TheInnocentOne - 19.06.2010
Do you not know how switches work in PAWN?
Re: crimes -
Kar - 19.06.2010
yea i know how