SA-MP Forums Archive
compiled not - 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: compiled not (/showthread.php?tid=514374)



compiled not - Shinobu - 21.05.2014



compiled not help me fix it.


Re: compiled not - Copfan5 - 21.05.2014

Show us your code please. We need to know which lines as well so if you can make a comment on each line that would be great!!!


Re: compiled not - Shinobu - 21.05.2014

Quote:
Originally Posted by Copfan5
View Post
Show us your code please. We need to know which lines as well so if you can make a comment on each line that would be great!!!

7452-7460
Quote:

{
if(!IsPlayerLoggedIn(playerid) || PlayerInfo[playerid][pAsshole] == 1) return SendClientMessage(playerid, COLOR_GREY, "You are not allowed to use command.");
if(IsPlayerCuffed(playerid) || IsPlayerTazed(playerid) || IsPlayerTied(playerid) || Boxing[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You can't do that at this time.");
TogglePlayerControllable(playerid, 1);
new Float:Pos[3];
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
SetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]+5);
return 1;
}




Re: compiled not - Faisal_khan - 21.05.2014

You have a declared Pos as a global variable already. Make it local or change it to Pos1 or Pos2.


Re: compiled not - Shinobu - 21.05.2014

Quote:
Originally Posted by Faisal_khan
View Post
You have a declared Pos as a global variable already. Make it local or change it to Pos1 or Pos2.
I do not understand what to do tell me.


Re: compiled not - Faisal_khan - 21.05.2014

pawn Code:
{
if(!IsPlayerLoggedIn(playerid) || PlayerInfo[playerid][pAsshole] == 1) return SendClientMessage(playerid,COLOR_GREY, "You are not allowed to use command.");
if(IsPlayerCuffed(playerid) || IsPlayerTazed(playerid) || IsPlayerTied(playerid) || Boxing[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You can't do that at this time.");
TogglePlayerControllable(playerid, 1);
new Float:Pos1[3];
GetPlayerPos(playerid, Pos1[0], Pos1[1], Pos1[2]);
SetPlayerPos(playerid, Pos1[0], Pos1[1], Pos1[2]+5);
return 1;
}
Try this.


Re: compiled not - Shinobu - 21.05.2014

Help me to tee it up again.


9894-9906

Code:
{
	new string[128], Float:Pos[4];
	if(!IsPlayerLoggedIn(playerid) || PlayerInfo[playerid][pAsshole] == 1) return SendClientMessage(playerid, COLOR_GREY, "You are not allowed to use command.");
   	if(!IsACop(playerid) && !IsADOC(playerid) && !IsASAAF(playerid) && !IsFBI(playerid) && !IsSASD(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not an LSPD Oficer/FBI Agent.");
   	if(!PlayerInfo[playerid][pFacDuty]) return SendClientMessage(playerid, COLOR_GREY, "You are not on duty.");
	if(PlayerInfo[playerid][pFacRank] < 4) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command. (Rank 4+)");
	GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
    GetPlayerFacingAngle(playerid,Pos[3]);
 	CreateStrip(Pos[0], Pos[1], Pos[2],Pos[3]);
 	format(string, sizeof(string), "LSPD: %s has created a spike strip.", RPN(playerid));
 	SendCopMessage(COLOR_BLUE, string);
	return 1;
}



Re: compiled not - Faisal_khan - 21.05.2014

Alright search for Pos outside a callback and change it to Pos2.


Re: compiled not - Konstantinos - 21.05.2014

Do the same again as Faisal_khan showed you on the previous one.
And in yom_buttons include file, return 1 at the end of OnObjectMoved callback.


Re: compiled not - Shinobu - 21.05.2014

Quote:
Originally Posted by Faisal_khan
View Post
Alright search for Pos outside a callback and change it to Pos2.
I do not understand what to do tell me.