05.03.2014, 21:10
ERRORS !
05.03.2014, 21:50
05.03.2014, 22:03
PHP код:
/* if(strcmp(cmd, "/takestretcher", true) == 0) //HOSPITAL (NEW)
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerInRangeOfPoint(playerid ,3.0, 1216.8700, -1370.1622, 1017.8790))
{
if(PlayerInfo[playerid][pMember] != 4 || PlayerInfo[playerid][pLeader] != 4)
{
AttachObjectToPlayer( hospybed, playerid, 0, 1.5, -0.5, 0, 0, 0 ); // add the co-ordinates on the player skin
return 1;
}
}
}
}
if(strcmp(cmd, "/dropstretcher", true) == 0) //HOSPITAL (NEW)
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerInRangeOfPoint(playerid ,25.0, 1216.8700, -1370.1622, 1017.8790))
{
if(PlayerInfo[playerid][pMember] != 4 || PlayerInfo[playerid][pLeader] != 4)
{
DestroyObject(hospybed);
hospybed = CreateDynamicObject(2146, 1217.627441, -1370.959229, 1017.364563, 0.0000, 0.0000, 90.0000);
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You are Not inside the hospital!");
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You are Not High Enough Leader!");
return 1;
}
}
}*/
05.03.2014, 22:36
Okay, let's start on fixing this script.
FIRST: Make sure you have actually defined hospybed as something (You haven't included any definition line in this code paste.)
SECOND:
You had two else's in the same if statement, so I've moved that around slightly for you... It's untested of course, so I don't know if I've fixed it completely, but tell me if I'm wrong..
Lastly, you haven't provided the lines for your WARNINGS, it'll be handy to have a look at those too.
FIRST: Make sure you have actually defined hospybed as something (You haven't included any definition line in this code paste.)
SECOND:
pawn Код:
if(strcmp(cmd, "/takestretcher", true) == 0) //HOSPITAL (NEW)
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerInRangeOfPoint(playerid ,3.0, 1216.8700, -1370.1622, 1017.8790))
{
if(PlayerInfo[playerid][pMember] != 4 || PlayerInfo[playerid][pLeader] != 4)
{
AttachObjectToPlayer( hospybed, playerid, 0, 1.5, -0.5, 0, 0, 0 ); // add the co-ordinates on the player skin
return 1;
}
}
}
}
if(strcmp(cmd, "/dropstretcher", true) == 0) //HOSPITAL (NEW)
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerInRangeOfPoint(playerid ,25.0, 1216.8700, -1370.1622, 1017.8790))
{
if(PlayerInfo[playerid][pMember] != 4 || PlayerInfo[playerid][pLeader] != 4)
{
DestroyObject(hospybed);
hospybed = CreateDynamicObject(2146, 1217.627441, -1370.959229, 1017.364563, 0.0000, 0.0000, 90.0000);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You are Not High Enough Leader!");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You are Not inside the hospital!");
return 1;
}
}
}
Lastly, you haven't provided the lines for your WARNINGS, it'll be handy to have a look at those too.
06.03.2014, 11:00
OK, thanks for the help.
« Next Oldest | Next Newest »
Users browsing this thread: 1 Guest(s)