/robbank command -
Armando B - 02.08.2012
i did this but i get 4 errors
Код:
if(strcmp(cmdtext, "/robbank", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(robbing[playerid] == 1)
{
SendClientMessage(Playerid, 0xAFAFAFAA, "You Are Already Robbing The Bank!");
return 1;
}
if(alreadyrobbed[playerid] == 1)
{
SendClientMessage(playerid, 0xFFFFFFAA, "You Already Robbed The Bank Lately, Please Wait 1 Hour!");
return 1;
}
if(!IsPlayerInRangeOfPoint(playerid, 15.0, 2394.35,-1593.94,785.62))//CHANGE X Y Z!!!
{
SendClientMessage(playerid, 0xAFAFAFAA, "You Are Not At The Bank!");
return 1;
}
else
{
SendClientMessage(playerid, 0xFFFF00AA "You Have Robbed The Los Santos Local Bank And Stole $500,000!");
robbing[playerid] = 1;
LoopingAnim(playerid,"ped", "ARRESTgun", 4.0, 0, 1, 1, 1, 0);
GivePlayerMoney(playerid, 1000000);
SendClientMessageToAll(0xFF9900AA, "||----------Breaking News----------||");
SendClientMessageToAll(0x33CCFFAA, " The Los Santos Bank Has Been Robbed!");
SendClientMessageToAll(0x33CCFFAA, " We Advise Everyone To Stay Away From The Area");
SendClientMessageToAll(0x33CCFFAA, " Untill Further Notice.");
SendClientMessageToAll(0xFF9900AA, "||----------Breaking News----------||");
}
}
}
return 1;
}
errors:
Код:
C:\Documents and Settings\Owner\Desktop\Samp Stuff 2\my scripting\The Server\gamemodes\LS_DM.pwn(178) : warning 217: loose indentation
C:\Documents and Settings\Owner\Desktop\Samp Stuff 2\my scripting\The Server\gamemodes\LS_DM.pwn(182) : error 017: undefined symbol "robbing"
C:\Documents and Settings\Owner\Desktop\Samp Stuff 2\my scripting\The Server\gamemodes\LS_DM.pwn(182) : warning 215: expression has no effect
C:\Documents and Settings\Owner\Desktop\Samp Stuff 2\my scripting\The Server\gamemodes\LS_DM.pwn(182) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Owner\Desktop\Samp Stuff 2\my scripting\The Server\gamemodes\LS_DM.pwn(182) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Owner\Desktop\Samp Stuff 2\my scripting\The Server\gamemodes\LS_DM.pwn(182) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Re : /robbank command -
lelemaster - 02.08.2012
Do you have: new robbing[MAX_PLAYERS]; at the top of your script?
If you took this command from an other gamemode/filterscript, you should define your global variables.
EDIT: There is something that made me laught a lot, it says you stole 500.000$ from the bank but it gives you 1 million.
Re: /robbank command -
Armando B - 02.08.2012
yeah, i just fixed that bit
Re: /robbank command -
Armando B - 02.08.2012
i added it but i still get the errors?
Re: /robbank command -
Abravanel - 02.08.2012
Try
pawn Код:
if(strcmp(cmdtext, "/robbank", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(robbing[playerid] == 1)
{
SendClientMessage(Playerid, 0xAFAFAFAA, "You Are Already Robbing The Bank!");
return 1;
}
if(alreadyrobbed[playerid] == 1)
{
SendClientMessage(playerid, 0xFFFFFFAA, "You Already Robbed The Bank Lately, Please Wait 1 Hour!");
return 1;
}
if(!IsPlayerInRangeOfPoint(playerid, 15.0, 2394.35,-1593.94,785.62))//CHANGE X Y Z!!!
{
SendClientMessage(playerid, 0xAFAFAFAA, "You Are Not At The Bank!");
return 1;
}
else
{
SendClientMessage(playerid, 0xFFFF00AA "You Have Robbed The Los Santos Local Bank And Stole $500,000!");
robbing[playerid] = 1;
LoopingAnim(playerid,"ped", "ARRESTgun", 4.0, 0, 1, 1, 1, 0);
GivePlayerMoney(playerid, 1000000);
SendClientMessageToAll(0xFF9900AA, "||----------Breaking News----------||");
SendClientMessageToAll(0x33CCFFAA, " The Los Santos Bank Has Been Robbed!");
SendClientMessageToAll(0x33CCFFAA, " We Advise Everyone To Stay Away From The Area");
SendClientMessageToAll(0x33CCFFAA, " Untill Further Notice.");
SendClientMessageToAll(0xFF9900AA, "||----------Breaking News----------||");
}
}
return 1;
}
Re: /robbank command -
Armando B - 02.08.2012
i try to copy and paste and it comes out in one line?
Re : Re: /robbank command -
lelemaster - 02.08.2012
Quote:
Originally Posted by Armando B
i try to copy and paste and it comes out in one line?
|
Use ****** chrome.
Re: /robbank command -
Armando B - 02.08.2012
same 4 errors
Код:
C:\Documents and Settings\Owner\Desktop\Samp Stuff 2\my scripting\The Server\gamemodes\LS_DM.pwn(178) : warning 217: loose indentation
C:\Documents and Settings\Owner\Desktop\Samp Stuff 2\my scripting\The Server\gamemodes\LS_DM.pwn(182) : error 017: undefined symbol "robbing"
C:\Documents and Settings\Owner\Desktop\Samp Stuff 2\my scripting\The Server\gamemodes\LS_DM.pwn(182) : warning 215: expression has no effect
C:\Documents and Settings\Owner\Desktop\Samp Stuff 2\my scripting\The Server\gamemodes\LS_DM.pwn(182) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Owner\Desktop\Samp Stuff 2\my scripting\The Server\gamemodes\LS_DM.pwn(182) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Owner\Desktop\Samp Stuff 2\my scripting\The Server\gamemodes\LS_DM.pwn(182) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.