Player Pausing After entering derby?
#1

PHP код:
  if(strcmp(cmd, "/derby", true) == 0)
            {
                if(
derbyplaying == 1)
                {
                    
SendClientMessage(playerid, 0xB4B5B7AA, "The derby is already started");
                    return 
1;
                }
                if(
playerinminigame[playerid] == 1)
                {
                    
SendClientMessage(playerid, 0xB4B5B7AA, "You are already in a minigame");
                    return 
1;
                }
                    new 
pname[256];
                    
GetPlayerName(playerid, pname, 256);
                if(
derbyon == 0)
                {
                    
derbyon = 1;
                    
playerinminigame[playerid] = 1;
                    
playerinderby[playerid] = 1;
                    
derbyrank = 1;
                    
SetPlayerInterior(playerid,15);
                    
SetPlayerVirtualWorld(playerid,7);
                    
SetVehicleVirtualWorld(bloodring[0],7);
                    
bloodringfull[0] = 1;
                    
PutPlayerInVehicle(playerid, bloodring[0], 0);
                    
playerinbloodring[playerid] = 0;
                    
TogglePlayerControllable(playerid, 0);
                    
startvar[0] = 1;
                    
dtimer = SetTimer("StartDerby", 60000, 0);
                    
format(string, sizeof(string), "%s has started a derby, you have one minute to type /derby and join", pname);//
                            
SendClientMessageToAll(0x33AA33AA,string);
                            return 
1;
                } else if(
derbyon == 1 && derbyrank < 15) {
                    
playerinminigame[playerid] = 1;
                    
playerinderby[playerid] = 1;
                    
derbyrank++;
                    
SetPlayerInterior(playerid,15);
                    for(new 
i=0; i<15; i++)
                    {
                            if(
bloodringfull[i] == 0)
                            {
                                
SetPlayerVirtualWorld(playerid,7);
                                
SetVehicleVirtualWorld(bloodring[i],7);
                                
bloodringfull[i] = 1;
                                
PutPlayerInVehicle(playerid, bloodring[i], 0);
                                
TogglePlayerControllable(playerid, 0);
                                
playerinbloodring[playerid] = i;
                                
format(string, sizeof(string), "%s has joined the derby", pname);//
                                            
SendClientMessageToAll(0x33AA33AA,string);
                                            return 
1;
                            }
                            }
                } else if(
derbyon == 1 && derbyrank >= 15) {
                        
format(string, sizeof(string), "The derby is full, wait for the next round", pname);//
                        
SendClientMessage(playerid,0x33AA33AA,string);
                        return 
1;
                }
            } 
Thats my code, Sorry for indentation, I got it from forums from pastebin, it fucked up the indent.
However, When every i use /derby command, i go to VW 7, Interior 15, with car.
But when another player do same, so they should join with me, They gets near my car, but paused
like,They pressed ESC.
I checked Virtual worlds, They're same.
I will explain what exactly happens
When i do /derby, It announces to other players.
When someone do /derby, I see his car near mine, and he's standing above the car pausing, But in fact, He see me pausing too, What causes this?
Reply
#2

Most important you have this PutPlayerInVehicle(playerid, bloodring[i], 0); maibe you don't have the vehicle with playerid
Check the server_log or mysql_log maybe give run time rror or someone else...
Reply
#3

do you have public onplayerupdate? if yes can i see it?
Reply
#4

Ohhhhhh, Thanks for help, I was denying weapons on interiors in my gamemode so, it was desynced ppls who got weapons
Thanks for help btw, Repped.
Reply
#5

Quote:
Originally Posted by karemmahmed22
Посмотреть сообщение
Ohhhhhh, Thanks for help, I was denying weapons on interiors in my gamemode so, it was desynced ppls who got weapons
Thanks for help btw, Repped.
glad to help you
Reply
#6

Ehm, Even after i resetted player weapons, Players still pauses :/
especially at those commands tping to another VW/Interior (Derby/Race)
PHP код:
           
            
if(strcmp(cmd, "/kartrace", true) == 0)
            {
                if(
kartplaying == 1)
                {
                    
SendClientMessage(playerid, 0xB4B5B7AA, "The kart race is already started");
                    return 
1;
                }
                if(
playerinminigame[playerid] == 1)
                {
                    
SendClientMessage(playerid, 0xB4B5B7AA, "You are already in a minigame");
                    return 
1;
                }
                    new 
pname[256];
                    
GetPlayerName(playerid, pname, 256);
                if(
karton == 0)
                {
                
                    
karton = 1;
                    
playerinminigame[playerid] = 1;
                    
playerinkartrace[playerid] = 1;
                    
kartrank = 1;
                    
krtfirst = 1;
                    
currentcheckpoint[playerid] = 0;
                    
SetPlayerInterior(playerid,15);
                    
SetPlayerVirtualWorld(playerid,7);
                    
SetVehicleVirtualWorld(karts[0],7);
                    
kartfull[0] = 1;
                    
PutPlayerInVehicle(playerid, karts[0], 0);
                    
playerinkart[playerid] = 0;
                    
TogglePlayerControllable(playerid, 0);
                    
SetPlayerRaceCheckpoint(playerid,0,kcps[0][0],kcps[0][1],kcps[0][2],kcps[1][0],kcps[1][1],kcps[1][2],20);
                    
startvar[6] = 1;
                    
krttimer = SetTimer("StartKart", 60000, 0);
                    
                    
format(string, sizeof(string), "%s has started a kart race, you have one minute to type /kartrace and join", pname);//
                            
SendClientMessageToAll(0x33AA33AA,string);
                        
ResetPlayerWeapons(playerid);
                            return 
1;
                } else if(
karton == 1 && kartrank < 15) {
                    
playerinminigame[playerid] = 1;
                    
playerinkartrace[playerid] = 1;
                    
kartrank++;
                    
currentcheckpoint[playerid] = 0;
                    
SetPlayerInterior(playerid,15);
                    for(new 
i=0; i<15; i++)
                    {
                            if(
kartfull[i] == 0)
                            {
                                
ResetPlayerWeapons(playerid);
                                
SetPlayerVirtualWorld(playerid,7);
                                
SetVehicleVirtualWorld(karts[i],7);
                                
kartfull[i] = 1;
                                
PutPlayerInVehicle(playerid, karts[i], 0);
                                
TogglePlayerControllable(playerid, 0);
                                
SetPlayerRaceCheckpoint(playerid,0,kcps[0][0],kcps[0][1],kcps[0][2],kcps[1][0],kcps[1][1],kcps[1][2],20);
                                
playerinkart[playerid] = i;
                                
format(string, sizeof(string), "%s has joined the kart race", pname);//
                                            
SendClientMessageToAll(0x33AA33AA,string);
                                            return 
1;
                            }
                            }
                } else if(
karton == 1 && kartrank >= 15) {
                        
format(string, sizeof(string), "The kart race is full, wait for the next round", pname);//
                        
SendClientMessage(playerid,0x33AA33AA,string);
                        return 
1;
                }
            }
           
            if(
strcmp(cmd, "/srace", true) == 0)
            {
                if(
srplaying == 1)
                {
                    
SendClientMessage(playerid, 0xB4B5B7AA, "The stadium race is already started");
                    return 
1;
                }
                if(
playerinminigame[playerid] == 1)
                {
                    
SendClientMessage(playerid, 0xB4B5B7AA, "You are already in a minigame");
                    return 
1;
                }
                    new 
pname[256];
                    
GetPlayerName(playerid, pname, 256);
                if(
sron == 0)
                {
                    
sron = 1;
                    
playerinminigame[playerid] = 1;
                    
playerinsr[playerid] = 1;
                    
srrank = 1;
                    
srfirst = 1;
                    
currentracecheckpoint[playerid] = 0;
                    
SetPlayerInterior(playerid,4);
                    
SetPlayerVirtualWorld(playerid,7);
                    
SetVehicleVirtualWorld(nrg[0],7);
                    
nrgfull[0] = 1;
                    
PutPlayerInVehicle(playerid, nrg[0], 0);
                    
playerinnrg[playerid] = 0;
                    
TogglePlayerControllable(playerid, 0);
                    
SetPlayerRaceCheckpoint(playerid,0,srcps[0][0],srcps[0][1],srcps[0][2],srcps[1][0],srcps[1][1],srcps[1][2],10);
                    
startvar[7] = 1;
                    
srtimer = SetTimer("StartSr", 60000, 0);
                    
format(string, sizeof(string), "%s has started a stadium race, you have one minute to type /srace and join", pname);//
                            
SendClientMessageToAll(0x33AA33AA,string);
                                                
ResetPlayerWeapons(playerid);
                            return 
1;
                } else if(
sron == 1 && srrank < 15) {
                    
playerinminigame[playerid] = 1;
                    
playerinsr[playerid] = 1;
                    
srrank++;
                    
currentracecheckpoint[playerid] = 0;
                    
SetPlayerInterior(playerid,4);
                    for(new 
i=0; i<15; i++)
                    {
                            if(
nrgfull[i] == 0)
                            {
                                                
ResetPlayerWeapons(playerid);
                                
SetPlayerVirtualWorld(playerid,7);
                                
SetVehicleVirtualWorld(nrg[i],7);
                                
nrgfull[i] = 1;
                                
PutPlayerInVehicle(playerid, nrg[i], 0);
                                
TogglePlayerControllable(playerid, 0);
                                
SetPlayerRaceCheckpoint(playerid,0,srcps[0][0],srcps[0][1],srcps[0][2],srcps[1][0],srcps[1][1],srcps[1][2],10);
                                
playerinnrg[playerid] = i;
                                
format(string, sizeof(string), "%s has joined the stadium race", pname);//
                                            
SendClientMessageToAll(0x33AA33AA,string);
                                            return 
1;
                            }
                            }
                } else if(
sron == 1 && srrank >= 15) {
                        
format(string, sizeof(string), "The stadium race is full, wait for the next round", pname);//
                        
SendClientMessage(playerid,0x33AA33AA,string);
                        return 
1;
                }
            } 
Reply
#7

well, there are
PHP код:
TogglePlayerControllable(playerid, 0); 
would it make the problem? or it being 1 later? if not try to remove / replace it with :
Код:
TogglePlayerControllable(playerid, 1);
Reply
#8

Nah, It unfreezes the player already, But still player pauses.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)