How to make the following thigns
#9

Quote:
Originally Posted by Krx17
Посмотреть сообщение
If somebody gives you a script you can't really expect to learn from it. Trust me, it will be better for you if you look at the Pseudo code, find the functions that you think are needed, and play around with them.

Here, I'll help you get started.
#6:
You want someone's color to change when he enters a plane.
Right there you know you need two functions.
pawn Код:
SetPlayerColor
GetVehicleModel
And there is also a callback for entering and exiting a vehicle.
pawn Код:
OnPlayerStateChange
//using PLAYER_STATE_DRIVER
Now all you have to do is piece them together.
pawn Код:
OnPlayerStateChange();
{
//something here
}
return 1;
{
edit:
the code that I got
pawn Код:
new mod = GetVehicleModel(vehicleid);
if(mod==577||)
{
SetPlayerColour(playerid,0x00FF00FF);
}
return 1;
}
I am getting errors
pawn Код:
C:\Users\Alex - Webhost\Desktop\Divinity Gaming Comunity\SA-MP\[SFP]Server For Pilots\gamemodes\sfp.pwn(9287) : warning 219: local variable "mod" shadows a variable at a preceding level
C:\Users\Alex - Webhost\Desktop\Divinity Gaming Comunity\SA-MP\[SFP]Server For Pilots\gamemodes\sfp.pwn(9288) : error 029: invalid expression, assumed zero
C:\Users\Alex - Webhost\Desktop\Divinity Gaming Comunity\SA-MP\[SFP]Server For Pilots\gamemodes\sfp.pwn(9290) : error 017: undefined symbol "SetPlayerColour"
C:\Users\Alex - Webhost\Desktop\Divinity Gaming Comunity\SA-MP\[SFP]Server For Pilots\gamemodes\sfp.pwn(9294) : error 010: invalid function or declaration
C:\Users\Alex - Webhost\Desktop\Divinity Gaming Comunity\SA-MP\[SFP]Server For Pilots\gamemodes\sfp.pwn(9296) : error 010: invalid function or declaration
C:\Users\Alex - Webhost\Desktop\Divinity Gaming Comunity\SA-MP\[SFP]Server For Pilots\gamemodes\sfp.pwn(9303) : error 010: invalid function or declaration
C:\Users\Alex - Webhost\Desktop\Divinity Gaming Comunity\SA-MP\[SFP]Server For Pilots\gamemodes\sfp.pwn(484) : warning 204: symbol is assigned a value that is never used: "GodTimer"
C:\Users\Alex - Webhost\Desktop\Divinity Gaming Comunity\SA-MP\[SFP]Server For Pilots\gamemodes\sfp.pwn(483) : warning 204: symbol is assigned a value that is never used: "PingTimer"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


5 Errors.
Reply


Messages In This Thread
How to make the following thigns - by propilot - 22.12.2010, 16:52
Re: How to make the following thigns - by Krx17 - 22.12.2010, 18:02
Re: How to make the following thigns - by propilot - 22.12.2010, 18:09
Re: How to make the following thigns - by [MWR]Blood - 22.12.2010, 18:12
Re: How to make the following thigns - by Darklom - 22.12.2010, 18:14
Re: How to make the following thigns - by propilot - 22.12.2010, 18:15
Re: How to make the following thigns - by Krx17 - 22.12.2010, 18:18
Re: How to make the following thigns - by [MWR]Blood - 22.12.2010, 18:19
Re: How to make the following thigns - by propilot - 22.12.2010, 18:21

Forum Jump:


Users browsing this thread: 1 Guest(s)