Opening of gate with checking for the level of player. -
gringoo - 14.02.2010
mod

en1
================================================== ===================================
48207 if(IsPlayerInSphere(i, -2127.4292, -80.0525, 35.3081,

)
48208 {
48209 if(PlayerInfo[playerid][pLevel] >= 5
48210
48211 {
48212 if (Gates12[i] == 1)
48213 {
48214 MoveDynamicObject(Gatesid1, -2136.3835, -80.5887, 35.3203,4);
48215 MoveDynamicObject(Gatesid2, -2118.3835, -80.5887, 35.3203,4);
48216 Gates12[i] = 0;
48217 }
48218
48219 else
48220 {
48221 MoveDynamicObject(Gatesid1, -2131.3835, -80.5887, 35.3203,1);
48222 MoveDynamicObject(Gatesid2, -2123.3835, -80.5887, 35.3203,1);
48223 }
48224 }
48224 }
48226 else
48227 {
48228 Gates12[i] = 1;
48229 }
================================================== ========================================
D:\gtaserver\gamemodes\00.pwn(48209) : error 017: undefined symbol "playerid"
D:\gtaserver\gamemodes\00.pwn(48211) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
================================================== ===========================================
Help me please.
Re: Opening of gate with checking for the level of player. -
VonLeeuwen - 14.02.2010
At what callback did you place this?
Re: Opening of gate with checking for the level of player. -
Calgon - 14.02.2010
pawn Код:
if(PlayerInfo[i][pLevel] >= 5)
You created a loop, with the player ID variable being 'i', so use the 'i' instead of 'playerid'.
Re: Opening of gate with checking for the level of player. -
gringoo - 14.02.2010
yes yes yes -'i'
Many thanks!
There is a 1 error.
===========================
48207 if(IsPlayerInSphere(i, -2127.4292, -80.0525, 35.3081,

)
48208 {
48209 if(PlayerInfo i [pLevel] >= 5)
48210
48211 {
48212 if (Gates12 == 1)
48213 {
48214 MoveDynamicObject(Gatesid1, -2136.3835, -80.5887, 35.3203,4);
48215 MoveDynamicObject(Gatesid2, -2118.3835, -80.5887, 35.3203,4);
48216 Gates12 = 0;
48217 }
48218
48219 else
48220 {
48221 MoveDynamicObject(Gatesid1, -2131.3835, -80.5887, 35.3203,1);
48222 MoveDynamicObject(Gatesid2, -2123.3835, -80.5887, 35.3203,1);
48223 }
48224 }
48224 }
48226 else
48227 {
48228 Gates12 = 1;
48229 }
====================================
D:\gtaserver\gamemodes\00.pwn(48211) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
=======================================
place please correctly brackets "{" and "}"
Re: Opening of gate with checking for the level of player. -
gringoo - 14.02.2010
place please correctly brackets "{" and "}"
Re: Opening of gate with checking for the level of player. -
kLx - 14.02.2010
pawn Код:
48209 if(PlayerInfo [ i ][pLevel] >= 5)
Re: Opening of gate with checking for the level of player. -
LuxurioN™ - 14.02.2010
Try:
pawn Код:
if(IsPlayerInSphere(i, -2127.4292, -80.0525, 35.3081,8))
{
if(PlayerInfo[i][pLevel] >= 5)
{
if (Gates12 == 1)
{
MoveDynamicObject(Gatesid1, -2136.3835, -80.5887, 35.3203,4);
MoveDynamicObject(Gatesid2, -2118.3835, -80.5887, 35.3203,4);
Gates12 = 0;
}
else
{
MoveDynamicObject(Gatesid1, -2131.3835, -80.5887, 35.3203,1);
MoveDynamicObject(Gatesid2, -2123.3835, -80.5887, 35.3203,1);
}
}
}
else
{
Gates12 = 1;
}
Re: Opening of gate with checking for the level of player. -
gringoo - 14.02.2010
many thanks all.
0 errors.
Thank boys.