Posts: 1,087
Threads: 103
Joined: Mar 2009
Hey I got to help me and he made this code
forward gc(playerid); //forward....
SetTimer("gc",60000,true); // 60 seconds or??
pawn Код:
public gc(playerid)
{
for(new i; i > MAX_PLAYERS; i++)
{
if(hasspawned[i] == 1)
{
SetPlayerScore(i, GetPlayerScore(i) + 1);
SendClientMessage(playerid,0xFFFFFFFF,"You recieved +1 score for flying!");
}
}
return 1;
}
Now, I want to change all of it only when player is in plane.
Any suggestions on how to do it?
Posts: 1,087
Threads: 103
Joined: Mar 2009
thank you! lol
now I want to do one point only for flying only planes and hilis. how would I do that?
Posts: 165
Threads: 39
Joined: Jan 2009
Reputation:
0
you would have to know all plane models which is a big ass list lol
Posts: 1,087
Threads: 103
Joined: Mar 2009
Quote:
Originally Posted by stix
you would have to know all plane models which is a big ass list lol
|
I know all of them.
Because I have a pilots server xD
Posts: 165
Threads: 39
Joined: Jan 2009
Reputation:
0
ok then do this
if(GetPlayerVehicleID(playerid) == plane1 || GetPlayerVehicle(playerid) == 2 and go on
Posts: 1,087
Threads: 103
Joined: Mar 2009
Quote:
Originally Posted by stix
ok then do this
if(GetPlayerVehicleID(playerid) == plane1 || GetPlayerVehicle(playerid) == 2 and go on
|
thank you ill see if it works
i have to put it inside the score point right?
edit didnt add vehs only yet but I am getting errors already
Код:
C:\Users\Alex - Webhost\Desktop\Divinity Gaming Comunity\SA-MP\[SFP]Server For Pilots\gamemodes\sfp.pwn(1896) : warning 217: loose indentation
C:\Users\Alex - Webhost\Desktop\Divinity Gaming Comunity\SA-MP\[SFP]Server For Pilots\gamemodes\sfp.pwn(13322) : error 017: undefined symbol "hasspawned"
C:\Users\Alex - Webhost\Desktop\Divinity Gaming Comunity\SA-MP\[SFP]Server For Pilots\gamemodes\sfp.pwn(13322) : warning 215: expression has no effect
C:\Users\Alex - Webhost\Desktop\Divinity Gaming Comunity\SA-MP\[SFP]Server For Pilots\gamemodes\sfp.pwn(13322) : error 001: expected token: ";", but found "]"
C:\Users\Alex - Webhost\Desktop\Divinity Gaming Comunity\SA-MP\[SFP]Server For Pilots\gamemodes\sfp.pwn(13322) : error 029: invalid expression, assumed zero
C:\Users\Alex - Webhost\Desktop\Divinity Gaming Comunity\SA-MP\[SFP]Server For Pilots\gamemodes\sfp.pwn(13322) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
lines:
Код:
public gc(playerid)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(hasspawned[i] == 1)
{
SetPlayerScore(i, GetPlayerScore(i) + 1);
SendClientMessage(playerid,0xFFFFFFFF,"You recieved +1 score for flying!");
}
}
return 1;
}
Posts: 1,494
Threads: 120
Joined: Dec 2009
Reputation:
0
new hasspawned[MAX_PLAYERS];
if(hasspawned[i])
Posts: 1,087
Threads: 103
Joined: Mar 2009
Quote:
Originally Posted by willsuckformoney
new hasspawned[MAX_PLAYERS];
if(hasspawned[i])
|
worked thx!
about this
f(GetPlayerVehicleID(playerid) == plane1 || GetPlayerVehicle(playerid) == 2
it shouldn't be like that right?
something like tihs maybe?
f(GetPlayerVehicleID(playerid) == plane1 || GetPlayerVehicle(playerid) == 2);