Gate problem
#1

C:\Users\alex\Desktop\josegate.pwn(17) : error 017: undefined symbol "PlayerInfo"
C:\Users\alex\Desktop\josegate.pwn(17) : warning 215: expression has no effect
C:\Users\alex\Desktop\josegate.pwn(17) : error 001: expected token: ";", but found "]"
C:\Users\alex\Desktop\josegate.pwn(17) : error 029: invalid expression, assumed zero
C:\Users\alex\Desktop\josegate.pwn(17) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase






#include <a_samp>

forward PlayerToPoint(Float:radi, playerid, Float, Float:y, Float:z);

new Jose;

public OnFilterScriptInit()
{
Jose = CreateObject(969, 999.17, -644.53, 119.68, 0.00, 0.00, 22.5);
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/housegate", cmdtext, true, 10) == 0)
{
if(Eg: PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
if(PlayerToPoint(40, playerid, 999.17, -644.53, 119.6)
{
MoveObject(Jose, 990.08, -646.36, 120.46, 10);
Eg: SendClientMessage(playerid, 0xFFFFFF, "You've opened jose gate");
}
}else{
Eg: SendClientMessage(playerid, 0xFFFFF, "You dont no the pin code");
}
return 1;
}
return 0;
}

public PlayerToPoint(Float:radi, playerid, Float, Float:y, Float:z)
{
if(IsPlayerConnected(playerid))
{
new Floatldposx, Floatldposy, Floatldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
tempposx = (oldposx -x);
tempposy = (oldposy -y);
tempposy = (oldposy -z);
if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
return 1;
}
}
return 0;
}




im tring to add it as a fs but i get them errors what am i doing wrong also how do i make it only open to a faction
Reply
#2

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/housegate", cmdtext, true) == 0)
    {
        if(IsPlayerInRangeOfPoint(playerid, 40, 999.17, -644.53, 119.68))
        {
            MoveObject(Jose, 990.08, -646.36, 120.46, 10);
            SendClientMessage(playerid, 0xFFFFFFFF, "You've opened jose gate");
        }
        return 1;
    }
    return 0;
}
Reply
#3

try this now how can i make it work for a faction only this is just a test one im doing thanks
Reply
#4

C:\Program Files\Rockstar Games\GTA San Andreas\my server\gamemodes\larp.pwn(3979) : warning 225: unreachable code
C:\Program Files\Rockstar Games\GTA San Andreas\my server\gamemodes\larp.pwn(3979) : error 029: invalid expression, assumed zero
C:\Program Files\Rockstar Games\GTA San Andreas\my server\gamemodes\larp.pwn(3979) : error 017: undefined symbol "cmdtext"
C:\Program Files\Rockstar Games\GTA San Andreas\my server\gamemodes\larp.pwn(3981) : error 017: undefined symbol "cmdtext"
C:\Program Files\Rockstar Games\GTA San Andreas\my server\gamemodes\larp.pwn(3985) : error 017: undefined symbol "Jose"
C:\Program Files\Rockstar Games\GTA San Andreas\my server\gamemodes\larp.pwn(42704) : warning 235: public function lacks forward declaration (symbol "OnPlayerPrivmsg")
C:\Program Files\Rockstar Games\GTA San Andreas\my server\gamemodes\larp.pwn(44685) : warning 203: symbol is never used: "gMedicSpawns"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase



no bothered about the warnings

4 Errors.


edit did you mean add that as well as what already had


edit sorry ive been a idoit not put it in the right places lol sorry for watsing your time
Reply
#5

Change the code you had before.
Reply
#6

nan i got it to work fine as it was ust had part of it in the wrong place lol
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)