24.04.2010, 06:53
Hello all people in this community!
I am pretty new scripter, so I do not know much. I hope you won't disrespect me because of it. I am scripting 3rd day right now.
Anyway, I have made this script section:
When I use it first time, it gives all these. When I use it second time, it still does give these and returns the message also.
What have I done wrong?
Also, when I try to compile, it gives 2 errors:
Both are the SetPlayerHealth lines in FBI and SWAT.
I am pretty new scripter, so I do not know much. I hope you won't disrespect me because of it. I am scripting 3rd day right now.
Anyway, I have made this script section:
Код:
if(strcmp(cmdtext, "/swat", true) == 0)
{
if(GetPlayerSkin(playerid) == 285)
SendClientMessage(playerid, COLOR_RED, "You are SWAT already!");
else
SetPlayerArmour(playerid, 100);
SetPlayerHealth(playerid, 100);
SetPlayerSkin(playerid, 285);
SetPlayerColor(playerid, COLOR_GREEN);
GivePlayerWeapon(playerid, 8, 100);
GivePlayerWeapon(playerid, 31, 500);
GivePlayerWeapon(playerid, 29, 300);
GivePlayerWeapon(playerid, 34, 50);
GivePlayerWeapon(playerid, 24, 100);
return 1;
}
if(strcmp(cmdtext, "/fbi", true) == 0)
{
if(GetPlayerSkin(playerid) == 286)
SendClientMessage(playerid, COLOR_RED, "You are FBI already!");
else
SetPlayerArmour(playerid, 100);
SetPlayerHealth(playerid, 100);
SetPlayerSkin(playerid, 286);
SetPlayerColor(playerid, COLOR_GREEN);
GivePlayerWeapon(playerid, 8, 300);
GivePlayerWeapon(playerid, 31, 800);
GivePlayerWeapon(playerid, 29, 800);
GivePlayerWeapon(playerid, 34, 100);
GivePlayerWeapon(playerid, 24, 300);
return 1;
}
What have I done wrong?
Also, when I try to compile, it gives 2 errors:
Код:
C:\Documents and Settings\Janar\Desktop\SAMP\gamemodes\minu2.pwn(370) : warning 217: loose indentation C:\Documents and Settings\Janar\Desktop\SAMP\gamemodes\minu2.pwn(387) : warning 217: loose indentation

