Opening of gate with checking for the level of player.
#1

moden1
================================================== ===================================
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.
Reply
#2

At what callback did you place this?
Reply
#3

pawn Код:
if(PlayerInfo[i][pLevel] >= 5)
You created a loop, with the player ID variable being 'i', so use the 'i' instead of 'playerid'.
Reply
#4

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 "}"
Reply
#5



place please correctly brackets "{" and "}"

Reply
#6

pawn Код:
48209     if(PlayerInfo [ i ][pLevel] >= 5)
Reply
#7

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;
}
Reply
#8

many thanks all.
0 errors.

Thank boys.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)