SA-MP Forums Archive
Team Doors(FIX) - 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: Team Doors(FIX) (/showthread.php?tid=357158)



Team Doors(FIX) - zT KiNgKoNg - 06.07.2012

This Is The Code
Quote:

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (newkeys & KEY_SECONDARY_ATTACK)
{
new name[24];
GetPlayerName(playerid, name,sizeof(name));
if (strcmp(name, "Austin_Rapter",true) == 0)
if(IsPlayerInRangeOfPoint(playerid, 1.0,323.4512, 311.1318, 999.5049))
{
if (isopen1 == 0)
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "What Would You Like To Do", "Open\nClose\nInfo", "Select", "Close");
MoveObject(test,320.9000, 313.7110, 1000.7000,0.90);
ApplyAnimation(playerid, "HEIST9", "Use_SwipeCard", 4.0, 0, 0, 0, 0, 0);
GameTextForPlayer(playerid, "~b~Cell 1 ~g~Opening",1500,4);
isopen1 = 1;
return 1;
}
if (isopen1 == 1)
{
MoveObject(test, 320.89999389648, 312, 1000.700012207,0.90);
ApplyAnimation(playerid, "HEIST9", "Use_SwipeCard", 4.0, 0, 0, 0, 0, 0);
GameTextForPlayer(playerid, "~b~Cell 1 ~r~ Closing",1500,4);
isopen1 = 0;
return 1;
}
else
{
SendClientMessage(COLOR_RED,"Sorry Your In The Mafia Goto Your HQ And Open Them");
return 1;
}
}
}
return 1;
}

Quote:

And This Is The Error
error 035: argument type mismatch (argument 2)




AW: Team Doors(FIX) - Forbidden - 06.07.2012

Quote:

SendClientMessage(playerid, COLOR_RED,"Sorry Your In The Mafia Goto Your HQ And Open Them");

This means the things in the line arenґt all there, like you forgot playerid.


Re: Team Doors(FIX) - Roko_foko - 06.07.2012

EDIT: the guy before was faster


Re: AW: Team Doors(FIX) - zT KiNgKoNg - 06.07.2012

Quote:
Originally Posted by Forbidden
Посмотреть сообщение
This means the things in the line arenґt all there, like you forgot playerid.
Thanks i forgot about it now i know ill try and remember


Re: AW: Team Doors(FIX) - zT KiNgKoNg - 06.07.2012

Ok guys i changed it to

else if(gTeam[playerid] == Mafia)
{
MESSAGE
}
}
return 1;
}

and now its working thanks