Big, big server problem, please help :/
#1

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!
Reply
#2

did you return 1?... showing command will help more
Reply
#3

You must've Forgotten a "return 1;" somewhere.
Reply
#4

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"
Reply
#5

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 :/
Reply
#6

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.
Reply
#7

PHP код:
public OnPlayerUpdate(playerid)
{
//Speedometer is here
//Work for Drivers:
    
     
if(IsPlayerInVehicle(playerid516)) //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"30004);
                             
startworkpickup CreatePickup(13171410,0,2, -1);
                          }
                         }
                         else
                         {
                             
GameTextForPlayer(playerid"~w~ To work, enter the Vehicle as a Driver Please."30004);
                    }
                   return 
1;
                 }
        } 
//Other functions here. 
Reply
#8

I get loose identation warning on the line of the :return1;
...
Reply
#9

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
Reply
#10

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 :/
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)