20.10.2009, 08:25
Hello
I am a N00b Scripter and am learning so please dont judge me on my scripting.
I am using a map that Luke™ on the forums had created.
Its called Don't Fall.
I wanna have it so I can do /createhd and it creates the objects and then /deletehd and it deletes all of the objects!
The Object IDs are the ones Im trying to delete but how do I delete all of the Ids?
Heres my /deletehd script!
References:
http://forum.sa-mp.com/index.php?topic=123515.0
if(strcmp(cmd, "/deletehd", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
if (GetPlayerState(playerid) == 2)
{
DestroyObject(3374);
DestroyObject(16120);
DestroyObject(8355);
}
else
{
DestroyObject(3374);
DestroyObject(16120);
DestroyObject(8355);
}
SendClientMessage(playerid, COLOR_GRAD1, "You have removed the High Drop");
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "You are not authorized to use that command !");
}
}
return 1;
}
I am a N00b Scripter and am learning so please dont judge me on my scripting.
I am using a map that Luke™ on the forums had created.
Its called Don't Fall.
I wanna have it so I can do /createhd and it creates the objects and then /deletehd and it deletes all of the objects!
The Object IDs are the ones Im trying to delete but how do I delete all of the Ids?
Heres my /deletehd script!
References:
http://forum.sa-mp.com/index.php?topic=123515.0
if(strcmp(cmd, "/deletehd", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
if (GetPlayerState(playerid) == 2)
{
DestroyObject(3374);
DestroyObject(16120);
DestroyObject(8355);
}
else
{
DestroyObject(3374);
DestroyObject(16120);
DestroyObject(8355);
}
SendClientMessage(playerid, COLOR_GRAD1, "You have removed the High Drop");
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "You are not authorized to use that command !");
}
}
return 1;
}