Big, big server problem, please help :/ -
knackworst - 24.08.2011
Hi,
I got quiet a big server problem, and i did lots of research and script comparising
But i couldnt find the solution...
Well my server is prtty much f***** up while my gm script isnt...
I made simple cmds like: /b
Then the player team becomes bandit...
When i compile theres no error. When i test in game it says unknown command...
I got the same with a dcmd...
The script also puts team colors troigh eachoter, like when i define blue as blur
And i set setplayerteamcolor
To blue/COLOR_BLUE/
the team colour will show orange in game...
Also i got the lux admin and sometimes my score saves, sometimes it doesnt
I made several other team functions so that a player can only enter veh if its the right team...
But i test it ingame and it just doesnt work...
Please help me!
Re: Big, big server problem, please help :/ -
whitedragon - 24.08.2011
did you return 1?... showing command will help more
Re: Big, big server problem, please help :/ -
=WoR=G4M3Ov3r - 24.08.2011
You must've Forgotten a "return 1;" somewhere.
Re: Big, big server problem, please help :/ -
LZLo - 24.08.2011
https://sampwiki.blast.hk/wiki/OnPlayerCommandText
let's check this out: "Returns Returning 0 in this callback will pass the command to another script or display 'SERVER: Unknown command' if there are no scripts to pass it on to"
Re: Big, big server problem, please help :/ -
knackworst - 24.08.2011
Ok ill check my script, but postin cmd is hard cuz i have internet trouble on my pc so i have to post this via ipod touch :/
Re: Big, big server problem, please help :/ -
knackworst - 24.08.2011
Ok, I checked it and u guys were right, the command problems are fixed
and the teamcolor too.
but can someone tell me how to return this:
Код:
public OnPlayerUpdate(playerid)
{
//Speedometer is here
//Work for Drivers:
if(IsPlayerInVehicle(playerid, 516)) //If the player is in the Nebula (driver mission car)
{
if(gTeam[playerid] == TEAM_DRIVERS) //If the player is in the right team for the mission)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) //Check if the player is a driver
{
if(IsWorking[playerid] == 0) //Check if the player hasn't already started a Job
{
GameTextForPlayer(playerid, "~w~ U entered A ~y~Lvl 1~w~ vehicle. Please drive to the ~r~ Red marker~w~, located in front of the club. to Work", 3000, 4);
startworkpickup = CreatePickup(1317, 14, 10,0,2, -1);
}
}
else
{
GameTextForPlayer(playerid, "~w~ To work, enter the Vehicle as a Driver Please.", 3000, 4);
}
}
}
//Other functions here.
Re: Big, big server problem, please help :/ -
=WoR=G4M3Ov3r - 24.08.2011
PHP код:
public OnPlayerUpdate(playerid)
{
//Speedometer is here
//Work for Drivers:
if(IsPlayerInVehicle(playerid, 516)) //If the player is in the Nebula (driver mission car)
{
if(gTeam[playerid] == TEAM_DRIVERS) //If the player is in the right team for the mission)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) //Check if the player is a driver
{
if(IsWorking[playerid] == 0) //Check if the player hasn't already started a Job
{
GameTextForPlayer(playerid, "~w~ U entered A ~y~Lvl 1~w~ vehicle. Please drive to the ~r~ Red marker~w~, located in front of the club. to Work", 3000, 4);
startworkpickup = CreatePickup(1317, 14, 10,0,2, -1);
}
}
else
{
GameTextForPlayer(playerid, "~w~ To work, enter the Vehicle as a Driver Please.", 3000, 4);
}
return 1;
}
}
//Other functions here.
Re: Big, big server problem, please help :/ -
knackworst - 25.08.2011
I get loose identation warning on the line of the :return1;
...
Re: Big, big server problem, please help :/ -
=WoR=G4M3Ov3r - 25.08.2011
pawn Код:
public OnPlayerUpdate(playerid)
{
//Speedometer is here
//Work for Drivers:
if(IsPlayerInVehicle(playerid, 516)) //If the player is in the Nebula (driver mission car)
{
if(gTeam[playerid] == TEAM_DRIVERS) //If the player is in the right team for the mission)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) //Check if the player is a driver
{
if(IsWorking[playerid] == 0) //Check if the player hasn't already started a Job
{
GameTextForPlayer(playerid, "~w~ U entered A ~y~Lvl 1~w~ vehicle. Please drive to the ~r~ Red marker~w~, located in front of the club. to Work", 3000, 4);
startworkpickup = CreatePickup(1317, 14, 10,0,2, -1);
}
}
else
{
GameTextForPlayer(playerid, "~w~ To work, enter the Vehicle as a Driver Please.", 3000, 4);
}
}
return 1;
}
//Other functions here.
Try it now
Re: Big, big server problem, please help :/ -
knackworst - 25.08.2011
Same, problem :/
Loose identitation...
But maybe we should try to add it under OnPlayerStateChange?
SO like this:
Код:
public OnPlayerStateChange(playerid,newstate,oldstate)
{
new playerState = GetPlayerState(playerid);
if (playerState == PLAYER_STATE_DRIVER)
{
if(IsPlayerInVehicle(playerid, 516)) //If the player is in the Nebula (driver mission car)
{
if(gTeam[playerid] == TEAM_DRIVERS) //If the player is in the right team for the mission)
{
if(IsWorking[playerid] == 0) //Check if the player hasn't already started a Job
{
GameTextForPlayer(playerid, "~w~ U entered A ~y~Lvl 1~w~ vehicle. Please drive to the ~r~ Red marker~w~, located in front of the club. to Work", 3000, 4);
startworkpickup = CreatePickup(1317, 14, 670.15740966797,-12752222900391,13467164993286, -1);
}
}
else
{
GameTextForPlayer(playerid, "~w~ To work, enter the Vehicle as a Driver Please.", 3000, 4);
}
}
}
//other code in this callback:
But, that's returned wrong too... cuz it does not work in game :/