How to make the following thigns
#1

Hey people. I am making a game mode need some stupid help lol.
Ill add you credits that you helped me.

anyway I want to do

1.When player connects the server he gets $250,000 he can do that every 24 hours. What I mean use. He can't abuse the system he can get that once a day.

2.Give a player 25,000 for every minute he fly's a plane the following ids
Код:
417 425 447 460 
469 476 487 488 
497 511 512 513 
519 520 548 553 
563 577 592 593
they are all planes/helicopters.

3.Give a player 100,000 for teh hour he plays. Then 200,000 for the second hour, Then 300,000 ect....

4.Make a score system. When the player flys a plane for 1 minute he gets 1+ score.
plane ids:
Код:
417 425 447 460 
469 476 487 488 
497 511 512 513 
519 520 548 553 
563 577 592 593
5.Rules, when a player does /rules and does /accept rules he will get 10,000. He can do that ONCE only.

6.When A player enters a player it changes his nickname colors


Please, show me an example of each one please and I can do the rest my self. Thank you!!!!

Thank you. God bless you who will ever help me! Or ever helped me.
Reply
#2

1. Give him $250k, then store the date you gave it to him in his playerfile(if you save the stats), then next time he logs on, compare the current date to the saved date for that player and if its more than a day, give him $250k again.

2. Run a timer every second that counts to 60 and checks if he is in a vehicle and that vehicle is one of those ID's, when the timer hits 60, give him $25k.

3. Look at the above examples, it isn't much harder than changing around some things.

4. Look at number too but instead of $25k, use SetPlayerScore.

5. Again, look at number one.

6. ?
Reply
#3

Quote:
Originally Posted by Krx17
Посмотреть сообщение
1. Give him $250k, then store the date you gave it to him in his playerfile(if you save the stats), then next time he logs on, compare the current date to the saved date for that player and if its more than a day, give him $250k again.

2. Run a timer every second that counts to 60 and checks if he is in a vehicle and that vehicle is one of those ID's, when the timer hits 60, give him $25k.

3. Look at the above examples, it isn't much harder than changing around some things.

4. Look at number too but instead of $25k, use SetPlayerScore.

5. Again, look at number one.

6. ?
Didn't help that much ;/
number 6.When a player enters a plane his color will change.
I mean a script example
PlayerinVehicle something like that ;/
Reply
#4

Quote:
Originally Posted by propilot
Посмотреть сообщение
Didn't help that much ;/
number 6.When a player enters a plane his color will change.
I mean a script example
PlayerinVehicle something like that ;/
pawn Код:
new mod = GetVehicleModel(vehicleid);
if(mod==id1||mod==id2||and so on)
{
SetPlayerColour(playerid,color);
}
return 1;
}
^ Add this under onplayerentervehicle.
Reply
#5

Quote:
Originally Posted by propilot
Посмотреть сообщение
Didn't help that much ;/
number 6.When a player enters a plane his color will change.
I mean a script example
PlayerinVehicle something like that ;/
I highly suggest you go look in SA-MP wiki, you won't get very far if your asking the community to do the whole script for you..
Reply
#6

Quote:
Originally Posted by Delux13
Посмотреть сообщение
pawn Код:
new mod = GetVehicleModel(vehicleid);
if(mod==id1||mod==id2||and so on)
{
SetPlayerColour(playerid,color);
}
return 1;
}
^ Add this under onplayerentervehicle.
Not car id in server right?
Vehicle id like 215 ect right?
not like car id 0, 1, 2, 3 in server
Reply
#7

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.
Reply
#8

Quote:
Originally Posted by propilot
Посмотреть сообщение
Not car id in server right?
Vehicle id like 215 ect right?
not like car id 0, 1, 2, 3 in server
Vehicle IDs.
Such as the infernus's ID is 411.
Reply
#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


Forum Jump:


Users browsing this thread: 2 Guest(s)