SA-MP Forums Archive
What does this mean? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: What does this mean? (/showthread.php?tid=116137)



What does this mean? - Sal_Kings - 27.12.2009

Question 1.
Код:
if (strcmp(cmd, "/killingspreehelp", true) == 0 || strcmp(cmd, "/ksh", true) == 0)
What does this part mean
Код:
|| strcmp(cmd, "/ksh", true) == 0)
Question 2.
What does this mean?
Код:
if(Spree[killerid] == 5)
Question 3
Can you please explain how the following lines work? I know what they do, i just need a explanation of what the code is telling PAWN.
Код:
GetPlayerName(killerid, str, sizeof(str) );
		format(str, sizeof(str), "Killing Spree [%s] has %d Kills in a row", str, Spree[killerid] );
Question 4
What is the code so i will tell PAWN that if player is in a certain position then something happens?
EX : If player is in a certain X Y Z then his health will be set to 0. (He/she dies)
Also where do i put this code?


Re: What does this mean? - mprofitt - 27.12.2009

Quote:
Originally Posted by Sal_Kings
Question 1.
Код:
if (strcmp(cmd, "/killingspreehelp", true) == 0 || strcmp(cmd, "/ksh", true) == 0)
What does this part mean
Код:
|| strcmp(cmd, "/ksh", true) == 0)
|| = OR

Question 2.
What does this mean?
Код:
if(Spree[killerid] == 5)
if the varible Spree[killerid] = 5

Question 3
Can you please explain how the following lines work? I know what they do, i just need a explanation of what the code is telling PAWN.
Код:
GetPlayerName(killerid, str, sizeof(str) );
		format(str, sizeof(str), "Killing Spree [%s] has %d Kills in a row", str, Spree[killerid] );
Get player name function -- GetPlayerName(killerid, str=the string to store the name, the size of str)


Re: What does this mean? - Rks25 - 27.12.2009

For question 4 , i would advise you to search on function IsPlayerInArea.