server help
#1

I have a problem with my server.

public OnPlayerSpawn(playerid)
{
IsPlayerNPC(playerid);
{
SetPlayerPos(playerid,1463.9557,-1732.1586,13.382;
SetPlayerColor(playerid, COLOR_RED);
SendClientMessageToAll(COLOR_RED, "Ein neuer Zombie ist da!!");
}
else
{
SetPlayerPos(playerid,1463.9557,-1732.1586,13.382;
SetPlayerColor(playerid, COLOR_GREEN);
GivePlayerWeapon(playerid, 27, 500);
SetPlayerArmedWeapon(playerid, 27);
return 1;
}
return 0;
}

This isn't the full script!
When I test the server its says :

C:\Users\Kenny\Downloads\SAMP\Kenny\gamemodes\Blue Server.pwn(137) : error 029: invalid expression, assumed zero
C:\Users\Kenny\Downloads\SAMP\Kenny\gamemodes\Blue Server.pwn(145) : warning 225: unreachable code
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

Can somebody help me please??
Reply
#2

pawn Код:
public OnPlayerSpawn(playerid)
{
    if(IsPlayerNPC(playerid))
    {
        SetPlayerPos(playerid,1463.9557,-1732.1586,13.382;
        SetPlayerColor(playerid, COLOR_RED);
        SendClientMessageToAll(COLOR_RED, "Ein neuer Zombie ist da!!");
    }
    else
    {
        SetPlayerPos(playerid,1463.9557,-1732.1586,13.382;
        SetPlayerColor(playerid, COLOR_GREEN);
        GivePlayerWeapon(playerid, 27, 500);
        SetPlayerArmedWeapon(playerid, 27)
    }
    return 1;
}
Reply
#3

Danke sehr
Thanks
Reply
#4

Some brackets were missing

pawn Код:
public OnPlayerSpawn(playerid)
{
    if(IsPlayerNPC(playerid))
    {
        SetPlayerPos(playerid,1463.9557,-1732.1586,13.382);
        SetPlayerColor(playerid, COLOR_RED);
        SendClientMessageToAll(COLOR_RED, "Ein neuer Zombie ist da!!");
    }
    else
    {
        SetPlayerPos(playerid,1463.9557,-1732.1586,13.382);
        SetPlayerColor(playerid, COLOR_GREEN);
        GivePlayerWeapon(playerid, 27, 500);
        SetPlayerArmedWeapon(playerid, 27);
        return 1;
    }
    return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)