27.02.2014, 16:04
Could anyone help me understand how to make a /robbank command with a timer using gametextforplayer?
CMD:rob(playerid,params[]){
if(Robbery[playerid] == 0){
if(IsPlayerInRangeOfPoint(playerid,5,2459.6631,-1690.4041,13.5418)){
SetTimer("RobberyEnd",10000,false);
SetTimer("ReEnable",20000,false);
SendClientMessage(playerid,COLOR_BLUE,"[NovaGaming] You are now robbing ryder");
}else if(IsPlayerInRangeOfPoint(playerid,5,2399.1931,-1897.9839,13.5469)){
SetTimer("RobberyEnd",10000,false);
SetTimer("ReEnable",20000,false);
SendClientMessage(playerid,COLOR_BLUE,"[NovaGaming] You are now robbing cluck and bell");
}else if(IsPlayerInRangeOfPoint(playerid,5,2399.8313,-1979.8795,13.5469)){
SetTimer("RobberyEnd",10000,false);
SetTimer("ReEnable",20000,false);
SendClientMessage(playerid,COLOR_BLUE,"[NovaGaming] You are now robbing the ammunation");
}else if(IsPlayerInRangeOfPoint(playerid,5,1257.4585,-785.6074,92.0302)){
SetTimer("RobberyEndmaddog",10000,false);
SetTimer("ReEnable",20000,false);
SendClientMessage(playerid,COLOR_BLUE,"[NovaGaming] You are now robbing rapper maddog");
}else if(IsPlayerInRangeOfPoint(playerid,5,2244.4800,-1664.0601,15.4766)){
SetTimer("RobberyEnd",10000,false);
SetTimer("ReEnable",20000,false);
SendClientMessage(playerid,COLOR_BLUE,"[NovaGaming] You are now robbing binco cloth store");
}else if(IsPlayerInRangeOfPoint(playerid,5,2070.1711,-1699.9264,13.5469)){
SetTimer("RobberyEndSmoke",10000,false);
SetTimer("ReEnable",20000,false);
SendClientMessage(playerid,COLOR_BLUE,"[NovaGaming] You are now robbing bigsmoke");
}else if(IsPlayerInRangeOfPoint(playerid,5,2073.2109,-1790.9413,13.5469)){
SetTimer("RobberyEnd",10000,false);
SetTimer("ReEnable",20000,false);
SendClientMessage(playerid,COLOR_BLUE,"[NovaGaming] You are now robbing the barber");
}else if(IsPlayerInRangeOfPoint(playerid,5,2070.5139,-1779.6097,13.5587)){
SetTimer("RobberyEnd",10000,false);
SetTimer("ReEnable",10000,false);
SendClientMessage(playerid,COLOR_BLUE,"[NovaGaming] You are now robbing the tatoo shop");
}else if(IsPlayerInRangeOfPoint(playerid,5,2100.0205,-1804.9998,13.1250)){
SetTimer("RobberyEnd",10000,false);
SetTimer("ReEnable",20000,false);
SendClientMessage(playerid,COLOR_BLUE,"[NovaGaming] You are now robbing the well stacked pizza");
}else if(IsPlayerInRangeOfPoint(playerid,5,1553.0657,-1677.6948,15.7488)){
SetTimer("RobberyEndPol",10000,false);
SetTimer("ReEnable",20000,false);
SendClientMessage(playerid,COLOR_BLUE,"[NovaGaming] You are now robbing the police rofl");
}else if (IsPlayerInRangeOfPoint(playerid,5,1198.6941,-920.8864,43.0338)){
SetTimer("RobberyEnd",10000,false);
SetTimer("ReEnable",20000,false);
SendClientMessage(playerid,COLOR_BLUE,"[NovaGaming] You are now robbing the burgershot");
}else if(IsPlayerInRangeOfPoint(playerid,5,2310.2744,-1646.3601,14.8270)){
SetTimer("RobberyEnd",10000,false);
SetTimer("ReEnable",20000,false);
SendClientMessage(playerid,COLOR_BLUE,"[NovaGaming] You are now robbing the bar");
}else if(IsPlayerInRangeOfPoint(playerid,5,2421.7527,-1509.9463,23.9922)){
SetTimer("RobberyEnd",10000,false);
SetTimer("ReEnable",20000,false);
SendClientMessage(playerid,COLOR_BLUE,"[NovaGaming] You are now robbing cluck and bell");
}else if(IsPlayerInRangeOfPoint(playerid,5,1364.7058,-1279.0549,13.5469)){
SetTimer("RobberyEnd",10000,false);
SetTimer("ReEnable",20000,false);
SendClientMessage(playerid,COLOR_BLUE,"[NovaGaming] You are now robbing the ammunation");
}else if(IsPlayerInRangeOfPoint(playerid,5,815.0482,-1619.2842,13.6707)){
SetTimer("RobberyEnd",10000,false);
SetTimer("ReEnable",20000,false);
SendClientMessage(playerid,COLOR_BLUE,"[NovaGaming] You are now robbing the burgershot");
}else if(IsPlayerInRangeOfPoint(playerid,5,1973.0522,-2036.7435,13.5469)){
SetTimer("RobberyEnd",10000,false);
SetTimer("ReEnable",20000,false);
SendClientMessage(playerid,COLOR_BLUE,"[NovaGaming] You are now robbing the tatoo shop");
} else{
SendClientMessage(playerid,COLOR_RED,"[NovaGaming] Not near an house or store to rob");
}
}
return 1;
}
forward RobberyEnd(playerid);
public RobberyEnd(playerid){
GivePlayerMoney(playerid,15000);
return 1;
}
forward RobberyEndmaddog(playerid);
public RobberyEndmaddog(playerid){
GivePlayerMoney(playerid,1500000);
return 1;
}
forward RobberyEndSmoke(playerid);
public RobberyEndSmoke(playerid){
GivePlayerMoney(playerid,150000);
return 1;
}
forward RobberyEndPol(playerid);
public RobberyEndPol(playerid){
GivePlayerMoney(playerid,200000);
return 1;
}
C:\Users\Shane\Desktop\TestingArea\gamemodes\TestingArea.pwn(787) : error 017: undefined symbol "Robbery" C:\Users\Shane\Desktop\TestingArea\gamemodes\TestingArea.pwn(787) : warning 215: expression has no effect C:\Users\Shane\Desktop\TestingArea\gamemodes\TestingArea.pwn(787) : error 001: expected token: ";", but found "]" C:\Users\Shane\Desktop\TestingArea\gamemodes\TestingArea.pwn(787) : error 029: invalid expression, assumed zero C:\Users\Shane\Desktop\TestingArea\gamemodes\TestingArea.pwn(787) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
I Get these.
Код:
C:\Users\Shane\Desktop\TestingArea\gamemodes\TestingArea.pwn(787) : error 017: undefined symbol "Robbery" C:\Users\Shane\Desktop\TestingArea\gamemodes\TestingArea.pwn(787) : warning 215: expression has no effect C:\Users\Shane\Desktop\TestingArea\gamemodes\TestingArea.pwn(787) : error 001: expected token: ";", but found "]" C:\Users\Shane\Desktop\TestingArea\gamemodes\TestingArea.pwn(787) : error 029: invalid expression, assumed zero C:\Users\Shane\Desktop\TestingArea\gamemodes\TestingArea.pwn(787) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors. |
new Robbery[MAX_PLAYERS];
pawn Код:
|