How to end this script good ? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to end this script good ? (
/showthread.php?tid=358989)
How to end this script good ? -
devil shill - 12.07.2012
hello guys,
i have a little script that i would put into te Ravens scip but it wil not compile anything below it so could anyone tell me how to end this script good ?
Код:
if(strcmp(cmd, "/househeal", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
new location = PlayerInfo[playerid][pLocal];
if(!strlen(tmp))
{
if(location != 255)
{
if(location < 99)
{
if(HouseInfo[location][hArm] == 1)
{
format(string, sizeof(string), "* %s puts on body armour.", sendername);
ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
SafeSetPlayerArmour(playerid, 50.0);
}
else
{
format(string, sizeof(string), "This place does not have armour upgrades.");
SendClientMessage(playerid, TEAM_GREEN_COLOR,string);
}
if(HouseInfo[location][hHel] == 1)
{
new Float:tempheal;
GetPlayerHealth(playerid,tempheal);
if ( tempheal < 100.0)
{
SetPlayerHealth(playerid,100.0);
PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
format(string, sizeof(string), "You have been healed to 100 health.");
SendClientMessage(playerid, TEAM_GREEN_COLOR,string);
}
else
{
SendClientMessage(playerid, TEAM_GREEN_COLOR,"You are already healed to 100.");
}
}
else
{
format(string, sizeof(string), "This place does not have healing upgrades.");
SendClientMessage(playerid, TEAM_GREEN_COLOR,string);
}
return 1;
Re: How to end this script good ? -
clarencecuzz - 12.07.2012
pawn Код:
if(strcmp(cmdtext, "/househeal", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
new location = PlayerInfo[playerid][pLocal];
if(!strlen(tmp))
{
if(location != 255)
{
if(location < 99)
{
if(HouseInfo[location][hArm] == 1)
{
format(string, sizeof(string), "* %s puts on body armour.", sendername);
ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
SafeSetPlayerArmour(playerid, 50.0);
}
else
{
format(string, sizeof(string), "This place does not have armour upgrades.");
SendClientMessage(playerid, TEAM_GREEN_COLOR,string);
}
if(HouseInfo[location][hHel] == 1)
{
new Float:tempheal;
GetPlayerHealth(playerid,tempheal);
if ( tempheal < 100.0)
{
SetPlayerHealth(playerid,100.0);
PlayerPlaySound(playerid, 1150, 0.0, 0.0, 0.0);
format(string, sizeof(string), "You have been healed to 100 health.");
SendClientMessage(playerid, TEAM_GREEN_COLOR,string);
}
else
{
SendClientMessage(playerid, TEAM_GREEN_COLOR,"You are already healed to 100.");
}
}
else
{
format(string, sizeof(string), "This place does not have healing upgrades.");
SendClientMessage(playerid, TEAM_GREEN_COLOR,string);
}
}
}
}
}
return 1;
}