SA-MP Forums Archive
how about this? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: how about this? (/showthread.php?tid=113096)



how about this? - PANNA - 12.12.2009

I'm trying to make 2 teams as it is showed at wiki-samp
https://sampwiki.blast.hk/wiki/PAWN_tutorial


pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerTeamFromClass(playerid, classid)
{
    if (classid == 0)
    {
        gTeam[playerid] = TEAM_GROVE;
    }
    else
    {
        gTeam[playerid] = TEAM_BALLA;
    }
}
    return 1;
}
C:\Users\Onno\Documents\ALLIN1\da\filterscripts\te ams.pwn(55) : error 017: undefined symbol "SetPlayerTeamFromClass"






Re: how about this? - [HiC]TheKiller - 12.12.2009

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerTeamFromClass(playerid, classid);
    return 1;
}

SetPlayerTeamFromClass(playerid, classid)
{
    if (classid == 0)
    {
        gTeam[playerid] = TEAM_GROVE;
    }
    else
    {
        gTeam[playerid] = TEAM_BALLA;
    }
    return 1;
}



Re: how about this? - PANNA - 12.12.2009

AHH DAMN


pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerTeamFromClass(playerid, classid);
    return 1;
}

SetPlayerTeamFromClass(playerid, classid)
{
if (classid == 0)
{
gTeam[playerid] = TEAM_GROVE;
}
else
{
gTeam[playerid] = TEAM_BALLA;
}
}
return 1;    <--- 70
{
SetPlayerToTeamColor(playerid)
{
    if (gTeam[playerid] == TEAM_GROVE)
    {
        SetPlayerColor(playerid, TEAM_GROVE_COLOR);
    }
    else if (gTeam[playerid] == TEAM_BALLA)
    {
        SetPlayerColor(playerid, TEAM_BALLA_COLOR);
    }
}


C:\Users\Onno\Documents\ALLIN1\da\filterscripts\te ams.pwn(70) : error 010: invalid function or declaration


Re: how about this? - Nero_3D - 12.12.2009

check your brackets and try to intend your code, pls


here your code again, just intended, hope you see the mistake
if you use IE, you wont see it intended
pawn Код:
SetPlayerTeamFromClass(playerid, classid)
{
    if (classid == 0)
    {
        gTeam[playerid] = TEAM_GROVE;
    }
    else
    {
        gTeam[playerid] = TEAM_BALLA;
    }
}

return 1;    <--- 70
{

SetPlayerToTeamColor(playerid)
{
    if (gTeam[playerid] == TEAM_GROVE)
    {
        SetPlayerColor(playerid, TEAM_GROVE_COLOR);
    }
    else if (gTeam[playerid] == TEAM_BALLA)
    {
        SetPlayerColor(playerid, TEAM_BALLA_COLOR);
    }
}



Re: how about this? - PANNA - 12.12.2009

rofl still got the error...


Re: how about this? - acade - 12.12.2009

Post line 70.


Re: how about this? - PANNA - 12.12.2009

Quote:
Originally Posted by TheOneThatOwnZ
Post line 70.
see what ♣ ⓐⓢⓢ said


Re: how about this? - Nero_3D - 12.12.2009

Quote:
Originally Posted by PANNA
rofl still got the error...
I never said that I fixed the error
I only intend your code
but it looks like you still dont see the problem
I suggeset to remove line 70 and 71


Re: how about this? - PANNA - 12.12.2009

Quote:
Originally Posted by ♣ ⓐⓢⓢ
Quote:
Originally Posted by PANNA
rofl still got the error...
I never said that I fixed the error
I only intend your code
but it looks like you still dont see the problem
I suggeset to remove line 70 and 71
ohh, you are good



ahh, another one:
if (classid == 0) <----82
{
gTeam[playerid] = TEAM_GROVE;
}

C:\Users\Onno\Documents\ALLIN1\da\filterscripts\te ams.pwn(82) : error 010: invalid function or declaration


Re: how about this? - PANNA - 12.12.2009

already thought there came no reply's, please help