|
You forgot a ";" in the end of the last line. In future post your code. It's necessary.
|


C:\Program Files (x86)\Rockstar Games\GTA San Andreas\Server\gamemodes\stunt1.pwn(1409) : error 001: expected token: ";", but found "if"

|
I added ";" end of line 1409 else if (Connected[playerid] == 1); but still same errors
|
public OnPlayerDisconnect(playerid, reason)
{
PlayerPlaySound(playerid, 1185+1, 0.0, 0.0, 0.0);
ShowNameTags(1);
ShowPlayerMarkers(1);
{
SetPlayerPos(playerid,-688.0696,942.0925,16.8293);
SetPlayerInterior(playerid,0);
SetCameraBehindPlayer(playerid);
SetPlayerFacingAngle(playerid,178);
}
else if (Connected[playerid] == 1)
{
Connected[playerid] = 0;
SetPlayerInterior(playerid,0);
SendClientMessage(playerid,GREEN,"Welcome to Stunt1 server!");
SendClientMessage(playerid,GREEN,"Would be much appreciated if you read the rules ( /rules ) and view all our commands for you ( /commands )!");
SendClientMessage(playerid,GREEN,"If you need any help, ask an admin. Report a cheater/rule breaker if due to an admin. And have fun!");
GameTextForPlayer(playerid,"~r~~h~/commands~n~~g~/rules",5000,6);
}
else
{
SetPlayerInterior(playerid,0);
}
return 1;
}
|
Код:
public OnPlayerDisconnect(playerid, reason)
{
PlayerPlaySound(playerid, 1185+1, 0.0, 0.0, 0.0);
ShowNameTags(1);
ShowPlayerMarkers(1);
{
SetPlayerPos(playerid,-688.0696,942.0925,16.8293);
SetPlayerInterior(playerid,0);
SetCameraBehindPlayer(playerid);
SetPlayerFacingAngle(playerid,178);
}
else if (Connected[playerid] == 1)
{
Connected[playerid] = 0;
SetPlayerInterior(playerid,0);
SendClientMessage(playerid,GREEN,"Welcome to Stunt1 server!");
SendClientMessage(playerid,GREEN,"Would be much appreciated if you read the rules ( /rules ) and view all our commands for you ( /commands )!");
SendClientMessage(playerid,GREEN,"If you need any help, ask an admin. Report a cheater/rule breaker if due to an admin. And have fun!");
GameTextForPlayer(playerid,"~r~~h~/commands~n~~g~/rules",5000,6);
}
else
{
SetPlayerInterior(playerid,0);
}
return 1;
}
|
else if (Connected[playerid] == 1)
{
Connected[playerid] = 0;
SetPlayerInterior(playerid,0);
SendClientMessage(playerid,GREEN,"Welcome to Stunt1 server!");
SendClientMessage(playerid,GREEN,"Would be much appreciated if you read the rules ( /rules ) and view all our commands for you ( /commands )!");
SendClientMessage(playerid,GREEN,"If you need any help, ask an admin. Report a cheater/rule breaker if due to an admin. And have fun!");
GameTextForPlayer(playerid,"~r~~h~/commands~n~~g~/rules",5000,6);
}