Hi there.
So I use streamer include for creating objects on my server.
I have the little "Don't get wet " filterscript minigame, which creates a bridge from some glass objects on top of the water and people are positioned on the glass. So people must stand on the glass as much as they can, because each glass, one by one, will be falling down into the water.
I implemented it on my gamemode, so I'm not using it as a filterscript, because I set the minigame to start at each payday.
Problem is that, when I test it on my WINDOWS pc, it works fine. But when I upload it to my server host, which uses linux, even though I modified the server.cfg to use plugins streamer.so instead of streamer.dll , when people type /getwet, glass objects don't create so everyone will fall down into water.
Generally to say, the big problem is that, the objects don't create at all, not even at the /roadblock command , It is very strange. So when I type /roadblock the roadblock doesn't creates, it just shows me the message: roadblock created.
PHP Code:
//Roadblock
if(strcmp(cmd, "/crb", true) == 0)
{
if(IsPlayerConnected(playerid) && IsACop(playerid) || IsPlayerAdmin(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /crb [Roadblock ID]");
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Available Roadblocks:");
SendClientMessage(playerid, COLOR_GRAD1, "| 1: Small Roadblock");
SendClientMessage(playerid, COLOR_GRAD1, "| 2: Medium Roadblock");
SendClientMessage(playerid, COLOR_GRAD1, "| 3: Big Roadblock");
SendClientMessage(playerid, COLOR_GRAD1, "| 4: Cone");
return 1;
}
new rb = strval(tmp);
if (rb == 1)
{
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
GetPlayerPos(playerid, plocx, plocy, plocz);
GetPlayerFacingAngle(playerid,ploca);
CreateRoadblock(1459,plocx,plocy,plocz,ploca);
format(string,sizeof(string),"[HQ]: Officer %s has placed a Roadblock(1) at his position, over.",PlayerName(playerid));
SendRadioMessage(1,TEAM_BLUE_COLOR,string);
GameTextForPlayer(playerid,"~w~Roadblock ~b~Placed!",3000,1);
return 1;
}
else if (rb == 2)
{
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
GetPlayerPos(playerid, plocx, plocy, plocz);
GetPlayerFacingAngle(playerid,ploca);
CreateRoadblock(978,plocx,plocy,plocz+0.6,ploca);
format(string,sizeof(string),"[HQ]: Officer %s has placed a Roadblock(2) at his position, over.",PlayerName(playerid));
SendRadioMessage(1,TEAM_BLUE_COLOR,string);
GameTextForPlayer(playerid,"~w~Roadblock ~b~Placed!",3000,1);
return 1;
}
else if (rb == 3)
{
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
GetPlayerPos(playerid, plocx, plocy, plocz);
GetPlayerFacingAngle(playerid,ploca);
CreateRoadblock(981,plocx,plocy,plocz+0.9,ploca+180);
format(string,sizeof(string),"[HQ]: Officer %s has placed a Roadblock(3) at his position, over.",PlayerName(playerid));
SendRadioMessage(1,TEAM_BLUE_COLOR,string);
GameTextForPlayer(playerid,"~w~Roadblock ~g~Placed!",3000,1);
SetPlayerPos(playerid, plocx, plocy+1.3, plocz);
return 1;
}
else if (rb == 4)
{
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
GetPlayerPos(playerid, plocx, plocy, plocz);
GetPlayerFacingAngle(playerid,ploca);
CreateRoadblock(1238,plocx,plocy,plocz+0.2,ploca);
format(string,sizeof(string),"[HQ]: Officer %s has placed a Traffic Cone(1) at his position, over.",PlayerName(playerid));
SendRadioMessage(1,TEAM_BLUE_COLOR,string);
GameTextForPlayer(playerid,"~w~Cone ~g~Placed!",3000,1);
return 1;
}
/*else if (rb == 4)
{
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
GetPlayerPos(playerid, plocx, plocy, plocz);
GetPlayerFacingAngle(playerid,ploca);
CreateRoadblock(1425,plocx,plocy,plocz+0.6,ploca);
format(string,sizeof(string),"[HQ]: Officer %s has placed a Detour Sign(4) at his position, over.",PlayerName(playerid));
SendRadioMessage(1,TEAM_BLUE_COLOR,string);
GameTextForPlayer(playerid,"~w~Sign ~g~Placed!",3000,1);
return 1;
}
else if (rb == 5)
{
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
GetPlayerPos(playerid, plocx, plocy, plocz);
GetPlayerFacingAngle(playerid,ploca);
CreateRoadblock(3265,plocx,plocy,plocz-0.5,ploca);
format(string,sizeof(string),"[HQ]: Officer %s has placed a Will Be Sign(5) at his position, over.",PlayerName(playerid));
SendRadioMessage(1,TEAM_BLUE_COLOR,string);
GameTextForPlayer(playerid,"~w~Sign ~g~Placed!",3000,1);
return 1;
}
else if (rb == 6)
{
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
new Float:plocx,Float:plocy,Float:plocz,Float:ploca;
GetPlayerPos(playerid, plocx, plocy, plocz);
GetPlayerFacingAngle(playerid,ploca);
CreateRoadblock(3091,plocx,plocy,plocz+0.5,ploca+180);
format(string,sizeof(string),"[HQ]: Officer %s has placed a Line Closed Sign(6) at his position, over.",PlayerName(playerid));
SendRadioMessage(1,TEAM_BLUE_COLOR,string);
GameTextForPlayer(playerid,"~w~Sign ~g~Placed!",3000,1);
return 1;
}*/
}
return 1;
}
else if (strcmp(cmd,"/rrb",true) == 0)
{
if(IsPlayerConnected(playerid) && IsACop(playerid) || IsPlayerAdmin(playerid))
{
DeleteClosestRoadblock(playerid);
format(string,sizeof(string),"[HQ]: Officer %s has removed a Roadblock, over.",PlayerName(playerid));
SendRadioMessage(1,TEAM_BLUE_COLOR,string);
GameTextForPlayer(playerid,"~w~Roadblock ~r~Removed!",3000,1);
}
return 1;
}
else if (strcmp(cmd,"/rrball",true) == 0)
{
if(IsPlayerConnected(playerid) && IsACop(playerid) || IsPlayerAdmin(playerid))
{
if(PlayerInfo[playerid][pRank] >= 6 || IsPlayerAdmin(playerid)) // This being the default Chief rank in LA-RP change if neccesary.
{
DeleteAllRoadblocks(playerid);
format(string,sizeof(string),"[HQ]: Officer %s has removed all Roadblocks in the area, over.",PlayerName(playerid));
SendRadioMessage(1,TEAM_BLUE_COLOR,string);
GameTextForPlayer(playerid,"~b~All ~w~Roadblocks ~r~Removed!",3000,1);
}
}
return 1;
}
Just Replace It I use This Is So Much Better... And Its /crb To MADE IT AND /rrb To Delete.
you don't understand. The problem is that whatever command I use to create any object, the object doesn't creates.
please help me, I now converted all CreateObject to CreateDynamicObject . The problem is that at first, the objects create when I type /roadblock but after some time, even though I delete the old ones, when I try creating a new roadblock the objects don't appear, even though I used CreateDynamicObject, which is a streamer function, and the number of objects should have no limits...weird.