Pickupmodel - 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: Pickupmodel (
/showthread.php?tid=521493)
Pickupmodel -
PawnOX - 23.06.2014
pawn Код:
if(strcmp(choice, "info", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] >= 6)
{
if(DDoorsInfo[doorid][ddInformation] == 0)
{
DDoorsInfo[doorid][ddInformation] = 1;
SendClientMessage(playerid, COLOR_WHITE, "Door has been set to 'information' label, Cannot be enterelable!");
}
else
{
DDoorsInfo[doorid][ddInformation] = 0;
SendClientMessage(playerid, COLOR_WHITE, "Door has been set to non 'information' label. Can be enterable again!");
}
SaveDynamicDoors();
format(string, sizeof(string), "%s has edited DoorID %d's NotEditable.", GetPlayerNameEx(playerid), doorid);
Log("logs/ddedit.log", string);
}
return 1;
}
I want it to change the pickupmodel to 3 when they set the door to "info"
for example: you set the door into "info" then the door you set info will be change its pickupmodel to 3
pawn Код:
else if(strcmp(choice, "pickupmodel", true) == 0)
{
DDoorsInfo[doorid][ddPickupModel] = amount;
format(string, sizeof(string), "You have changed the PickupModel to %d.", amount);
SendClientMessage(playerid, COLOR_WHITE, string);
//if(IsValidDynamicPickup(DDoorsInfo[doorid][ddPickupID])) DestroyPickup(DDoorsInfo[doorid][ddPickupID]);
DestroyPickup(DDoorsInfo[doorid][ddPickupID]);
if(IsValidDynamic3DTextLabel(DDoorsInfo[doorid][ddTextID])) DestroyDynamic3DTextLabel(DDoorsInfo[doorid][ddTextID]);
CreateDynamicDoor(doorid);
SaveDynamicDoors();
format(string, sizeof(string), "%s has edited DoorID %d's PickupModel.", GetPlayerNameEx(playerid), doorid);
Log("logs/ddedit.log", string);
return 1;
}