PDA

View Full Version : Robbing Help


Vendicatori
01/08/2012, 05:23 PM
Hello, i want to make my sf cnr robbing style like this:
http://i49.tinypic.com/24wfxp1.png

The current robbing style now is a dialog:
http://i45.tinypic.com/34zapsh.png

and you cannot chat in it thats annoying.
How can i do that help me please?

Vendicatori
01/08/2012, 05:41 PM
BAMP!

Vendicatori
01/08/2012, 09:44 PM
BUMP HELP ME PLEASE!

SEnergy
01/08/2012, 09:47 PM
http://wiki.sa-mp.com/wiki/CreatePickup
http://wiki.sa-mp.com/wiki/OnPlayerPickUpPickup
http://wiki.sa-mp.com/wiki/Textdraw

now use your imagination, logic and scripting skills, gl

Vendicatori
01/08/2012, 10:37 PM
I dont really understand that if you can can you make that for me?

}
GarciaBurgerShotRobbedRecently =320;
RobbingGarciaBurgerShot[playerid] =25;
IncreaseWantedLevel(playerid,4);
IncreasePlayerScore(playerid,1);
format(string,sizeof(string),"Robbing Burger Shot.\nFinish Robbery in: %d seconds.\nPolice are on the way.",RobbingGarciaBurgerShot[playerid]);
ShowPlayerDialog(playerid,DIALOG_BURGERSHOT,DIALOG _STYLE_MSGBOX,"{FF0000}Burger Shot Robbery",string,"Ok","Cancel");

I got dcmd system

Vendicatori
01/08/2012, 10:44 PM
BUMP

SnG.Scot_MisCuDI
01/08/2012, 11:46 PM
Stop bumping. Create textdraws and replace the dialog with the text draws.

Some things you need

TextDrawSetString
TextDrawShowForPlayer
TextDrawHideForPlayer
OnPlayerEnterDynamicCP
OnPlayerLeaveDynamicCP
SetTimerEx

[MM]RoXoR[FS]
02/08/2012, 06:48 AM
Here is the code

Add this on top of your script.

new Text:Textdraw0;
new Text:Textdraw1;
new Text:Textdraw2;
new Text:Textdraw3;
new Text:Textdraw4;
new Text:Textdraw5;
new Text:Textdraw6[MAX_PLAYERS];
new Text:Textdraw7;
new Text:Textdraw8[MAX_PLAYERS];
new Text:Textdraw9;
new Text:Textdraw10;

new R_Time[MAX_PLAYERS];
new Rob[MAX_PLAYERS];


Under OnGameModeInIt() add

Textdraw0 = TextDrawCreate(462.000000, 201.000000, "Robbery");
TextDrawBackgroundColor(Textdraw0, 255);
TextDrawFont(Textdraw0, 0);
TextDrawLetterSize(Textdraw0, 0.900000, 3.099999);
TextDrawColor(Textdraw0, -1);
TextDrawSetOutline(Textdraw0, 1);
TextDrawSetProportional(Textdraw0, 1);

Textdraw1 = TextDrawCreate(452.000000, 220.000000, " __________________");
TextDrawAlignment(Textdraw1, 2);
TextDrawBackgroundColor(Textdraw1, 255);
TextDrawFont(Textdraw1, 1);
TextDrawLetterSize(Textdraw1, 0.500000, 1.000000);
TextDrawColor(Textdraw1, -1);
TextDrawSetOutline(Textdraw1, 0);
TextDrawSetProportional(Textdraw1, 1);
TextDrawSetShadow(Textdraw1, 1);
TextDrawUseBox(Textdraw1, 1);
TextDrawBoxColor(Textdraw1, 70);
TextDrawTextSize(Textdraw1, 644.000000, 49.000000);

Textdraw2 = TextDrawCreate(507.000000, 220.000000, " __________________");
TextDrawAlignment(Textdraw2, 2);
TextDrawBackgroundColor(Textdraw2, 255);
TextDrawFont(Textdraw2, 1);
TextDrawLetterSize(Textdraw2, 0.500000, 1.000000);
TextDrawColor(Textdraw2, -1);
TextDrawSetOutline(Textdraw2, 0);
TextDrawSetProportional(Textdraw2, 1);
TextDrawSetShadow(Textdraw2, 1);
TextDrawUseBox(Textdraw2, 1);
TextDrawBoxColor(Textdraw2, 70);
TextDrawTextSize(Textdraw2, 644.000000, 49.000000);

Textdraw3 = TextDrawCreate(562.500000, 220.000000, " __________________");
TextDrawAlignment(Textdraw3, 2);
TextDrawBackgroundColor(Textdraw3, 255);
TextDrawFont(Textdraw3, 1);
TextDrawLetterSize(Textdraw3, 0.500000, 1.000000);
TextDrawColor(Textdraw3, -1);
TextDrawSetOutline(Textdraw3, 0);
TextDrawSetProportional(Textdraw3, 1);
TextDrawSetShadow(Textdraw3, 1);
TextDrawUseBox(Textdraw3, 1);
TextDrawBoxColor(Textdraw3, 70);
TextDrawTextSize(Textdraw3, 644.000000, 49.000000);

Textdraw4 = TextDrawCreate(436.000000, 234.000000, "Robbery in progress");
TextDrawBackgroundColor(Textdraw4, 255);
TextDrawFont(Textdraw4, 1);
TextDrawLetterSize(Textdraw4, 0.400000, 1.300000);
TextDrawColor(Textdraw4, -1);
TextDrawSetOutline(Textdraw4, 1);
TextDrawSetProportional(Textdraw4, 1);

Textdraw5 = TextDrawCreate(427.000000, 256.000000, "Store:");
TextDrawBackgroundColor(Textdraw5, 255);
TextDrawFont(Textdraw5, 1);
TextDrawLetterSize(Textdraw5, 0.330000, 0.899999);
TextDrawColor(Textdraw5, -1);
TextDrawSetOutline(Textdraw5, 1);
TextDrawSetProportional(Textdraw5, 1);



Textdraw7 = TextDrawCreate(427.000000, 283.000000, "Time Remaining:");
TextDrawBackgroundColor(Textdraw7, 255);
TextDrawFont(Textdraw7, 1);
TextDrawLetterSize(Textdraw7, 0.310000, 1.199999);
TextDrawColor(Textdraw7, -1);
TextDrawSetOutline(Textdraw7, 1);
TextDrawSetProportional(Textdraw7, 1);


Textdraw9 = TextDrawCreate(473.000000, 299.000000, "seconds remaining");
TextDrawBackgroundColor(Textdraw9, 255);
TextDrawFont(Textdraw9, 1);
TextDrawLetterSize(Textdraw9, 0.330000, 1.100000);
TextDrawColor(Textdraw9, 16711935);
TextDrawSetOutline(Textdraw9, 1);
TextDrawSetProportional(Textdraw9, 1);

Textdraw10 = TextDrawCreate(430.000000, 334.000000, "Please remain in the checkpoint or else your robbery will get cancelled.");
TextDrawBackgroundColor(Textdraw10, 255);
TextDrawFont(Textdraw10, 1);
TextDrawLetterSize(Textdraw10, 0.280000, 1.300000);
TextDrawColor(Textdraw10, -1);
TextDrawSetOutline(Textdraw10, 1);
TextDrawSetProportional(Textdraw10, 1);
TextDrawUseBox(Textdraw10, 1);
TextDrawBoxColor(Textdraw10, 0);
TextDrawTextSize(Textdraw10, 598.000000, -14.000000);


Under OnPlayerConnect add

Textdraw8[playerid] = TextDrawCreate(449.000000, 300.000000, "00");
TextDrawBackgroundColor(Textdraw8[playerid], 255);
TextDrawFont(Textdraw8[playerid], 1);
TextDrawLetterSize(Textdraw8[playerid], 0.410000, 1.100000);
TextDrawColor(Textdraw8[playerid], -16776961);
TextDrawSetOutline(Textdraw8[playerid], 1);
TextDrawSetProportional(Textdraw8[playerid], 1);

Textdraw6[playerid] = TextDrawCreate(440.000000, 266.000000, "Store Name");
TextDrawBackgroundColor(Textdraw6[playerid], 255);
TextDrawFont(Textdraw6[playerid], 1);
TextDrawLetterSize(Textdraw6[playerid], 0.360000, 1.000000);
TextDrawColor(Textdraw6[playerid], -16776961);
TextDrawSetOutline(Textdraw6[playerid], 1);
TextDrawSetProportional(Textdraw6[playerid], 1);

TextDrawHideForPlayer(playerid,Textdraw0);
TextDrawHideForPlayer(playerid,Textdraw1);
TextDrawHideForPlayer(playerid,Textdraw2);
TextDrawHideForPlayer(playerid,Textdraw3);
TextDrawHideForPlayer(playerid,Textdraw4);
TextDrawHideForPlayer(playerid,Textdraw5);
TextDrawHideForPlayer(playerid,Textdraw6[playerid]);
TextDrawHideForPlayer(playerid,Textdraw7);
TextDrawHideForPlayer(playerid,Textdraw8[playerid]);
TextDrawHideForPlayer(playerid,Textdraw9);
TextDrawHideForPlayer(playerid,Textdraw10);


Now, When Player Enter Checkpoint add

R_Time[playerid] = 60;
Rob[playerid] = SetTimerEx("RobberyTime",1000,true,"i",playerid);
new shopname[] = "MY SHOP NAME";//get Shop name and change it with your shop name
new str[3];
format(str,sizeof(str),"%d",R_Time[playerid]);

TextDrawSetString(Textdraw8[playerid],str);
TextDrawSetString(Textdraw6[playerid],shopname);
TextDrawShowForPlayer(playerid,Textdraw1);
TextDrawShowForPlayer(playerid,Textdraw2);
TextDrawShowForPlayer(playerid,Textdraw3);
TextDrawShowForPlayer(playerid,Textdraw4);
TextDrawShowForPlayer(playerid,Textdraw5);
TextDrawShowForPlayer(playerid,Textdraw6[playerid]);
TextDrawShowForPlayer(playerid,Textdraw7);
TextDrawShowForPlayer(playerid,Textdraw8[playerid]);
TextDrawShowForPlayer(playerid,Textdraw9);
TextDrawShowForPlayer(playerid,Textdraw10);
TextDrawShowForPlayer(playerid,Textdraw0);


When Player leaves checkpoint(unsuccessful robbery)

SendClientMessage(playerid,-1,"Failed");
TextDrawHideForPlayer(playerid,Textdraw0);
TextDrawHideForPlayer(playerid,Textdraw1);
TextDrawHideForPlayer(playerid,Textdraw2);
TextDrawHideForPlayer(playerid,Textdraw3);
TextDrawHideForPlayer(playerid,Textdraw4);
TextDrawHideForPlayer(playerid,Textdraw5);
TextDrawHideForPlayer(playerid,Textdraw6[playerid]);
TextDrawHideForPlayer(playerid,Textdraw7);
TextDrawHideForPlayer(playerid,Textdraw8[playerid]);
TextDrawHideForPlayer(playerid,Textdraw9);
TextDrawHideForPlayer(playerid,Textdraw10);
KillTimer(Rob[playerid]);


Add this anywhere on your script.

forward RobberyTime(playerid);
public RobberyTime(playerid)
{
if(R_Time[playerid]==0)
{
SendClientMessage(playerid,-1,"Successfull");
TextDrawHideForPlayer(playerid,Textdraw0);
TextDrawHideForPlayer(playerid,Textdraw1);
TextDrawHideForPlayer(playerid,Textdraw2);
TextDrawHideForPlayer(playerid,Textdraw3);
TextDrawHideForPlayer(playerid,Textdraw4);
TextDrawHideForPlayer(playerid,Textdraw5);
TextDrawHideForPlayer(playerid,Textdraw6[playerid]);
TextDrawHideForPlayer(playerid,Textdraw7);
TextDrawHideForPlayer(playerid,Textdraw8[playerid]);
TextDrawHideForPlayer(playerid,Textdraw9);
TextDrawHideForPlayer(playerid,Textdraw10);
KillTimer(Rob[playerid]);
return 1;
}
R_Time[playerid]--;
new str[3];
format(str,sizeof(str),"%d",R_Time[playerid]);
TextDrawSetString(Textdraw8[playerid],str);
return 1;
}

Vendicatori
02/08/2012, 08:02 PM
RoXoR[FS];2028184']Here is the code

Add this on top of your script.

new Text:Textdraw0;
new Text:Textdraw1;
new Text:Textdraw2;
new Text:Textdraw3;
new Text:Textdraw4;
new Text:Textdraw5;
new Text:Textdraw6[MAX_PLAYERS];
new Text:Textdraw7;
new Text:Textdraw8[MAX_PLAYERS];
new Text:Textdraw9;
new Text:Textdraw10;

new R_Time[MAX_PLAYERS];
new Rob[MAX_PLAYERS];


Under OnGameModeInIt() add

Textdraw0 = TextDrawCreate(462.000000, 201.000000, "Robbery");
TextDrawBackgroundColor(Textdraw0, 255);
TextDrawFont(Textdraw0, 0);
TextDrawLetterSize(Textdraw0, 0.900000, 3.099999);
TextDrawColor(Textdraw0, -1);
TextDrawSetOutline(Textdraw0, 1);
TextDrawSetProportional(Textdraw0, 1);

Textdraw1 = TextDrawCreate(452.000000, 220.000000, " __________________");
TextDrawAlignment(Textdraw1, 2);
TextDrawBackgroundColor(Textdraw1, 255);
TextDrawFont(Textdraw1, 1);
TextDrawLetterSize(Textdraw1, 0.500000, 1.000000);
TextDrawColor(Textdraw1, -1);
TextDrawSetOutline(Textdraw1, 0);
TextDrawSetProportional(Textdraw1, 1);
TextDrawSetShadow(Textdraw1, 1);
TextDrawUseBox(Textdraw1, 1);
TextDrawBoxColor(Textdraw1, 70);
TextDrawTextSize(Textdraw1, 644.000000, 49.000000);

Textdraw2 = TextDrawCreate(507.000000, 220.000000, " __________________");
TextDrawAlignment(Textdraw2, 2);
TextDrawBackgroundColor(Textdraw2, 255);
TextDrawFont(Textdraw2, 1);
TextDrawLetterSize(Textdraw2, 0.500000, 1.000000);
TextDrawColor(Textdraw2, -1);
TextDrawSetOutline(Textdraw2, 0);
TextDrawSetProportional(Textdraw2, 1);
TextDrawSetShadow(Textdraw2, 1);
TextDrawUseBox(Textdraw2, 1);
TextDrawBoxColor(Textdraw2, 70);
TextDrawTextSize(Textdraw2, 644.000000, 49.000000);

Textdraw3 = TextDrawCreate(562.500000, 220.000000, " __________________");
TextDrawAlignment(Textdraw3, 2);
TextDrawBackgroundColor(Textdraw3, 255);
TextDrawFont(Textdraw3, 1);
TextDrawLetterSize(Textdraw3, 0.500000, 1.000000);
TextDrawColor(Textdraw3, -1);
TextDrawSetOutline(Textdraw3, 0);
TextDrawSetProportional(Textdraw3, 1);
TextDrawSetShadow(Textdraw3, 1);
TextDrawUseBox(Textdraw3, 1);
TextDrawBoxColor(Textdraw3, 70);
TextDrawTextSize(Textdraw3, 644.000000, 49.000000);

Textdraw4 = TextDrawCreate(436.000000, 234.000000, "Robbery in progress");
TextDrawBackgroundColor(Textdraw4, 255);
TextDrawFont(Textdraw4, 1);
TextDrawLetterSize(Textdraw4, 0.400000, 1.300000);
TextDrawColor(Textdraw4, -1);
TextDrawSetOutline(Textdraw4, 1);
TextDrawSetProportional(Textdraw4, 1);

Textdraw5 = TextDrawCreate(427.000000, 256.000000, "Store:");
TextDrawBackgroundColor(Textdraw5, 255);
TextDrawFont(Textdraw5, 1);
TextDrawLetterSize(Textdraw5, 0.330000, 0.899999);
TextDrawColor(Textdraw5, -1);
TextDrawSetOutline(Textdraw5, 1);
TextDrawSetProportional(Textdraw5, 1);



Textdraw7 = TextDrawCreate(427.000000, 283.000000, "Time Remaining:");
TextDrawBackgroundColor(Textdraw7, 255);
TextDrawFont(Textdraw7, 1);
TextDrawLetterSize(Textdraw7, 0.310000, 1.199999);
TextDrawColor(Textdraw7, -1);
TextDrawSetOutline(Textdraw7, 1);
TextDrawSetProportional(Textdraw7, 1);


Textdraw9 = TextDrawCreate(473.000000, 299.000000, "seconds remaining");
TextDrawBackgroundColor(Textdraw9, 255);
TextDrawFont(Textdraw9, 1);
TextDrawLetterSize(Textdraw9, 0.330000, 1.100000);
TextDrawColor(Textdraw9, 16711935);
TextDrawSetOutline(Textdraw9, 1);
TextDrawSetProportional(Textdraw9, 1);

Textdraw10 = TextDrawCreate(430.000000, 334.000000, "Please remain in the checkpoint or else your robbery will get cancelled.");
TextDrawBackgroundColor(Textdraw10, 255);
TextDrawFont(Textdraw10, 1);
TextDrawLetterSize(Textdraw10, 0.280000, 1.300000);
TextDrawColor(Textdraw10, -1);
TextDrawSetOutline(Textdraw10, 1);
TextDrawSetProportional(Textdraw10, 1);
TextDrawUseBox(Textdraw10, 1);
TextDrawBoxColor(Textdraw10, 0);
TextDrawTextSize(Textdraw10, 598.000000, -14.000000);


Under OnPlayerConnect add

Textdraw8[playerid] = TextDrawCreate(449.000000, 300.000000, "00");
TextDrawBackgroundColor(Textdraw8[playerid], 255);
TextDrawFont(Textdraw8[playerid], 1);
TextDrawLetterSize(Textdraw8[playerid], 0.410000, 1.100000);
TextDrawColor(Textdraw8[playerid], -16776961);
TextDrawSetOutline(Textdraw8[playerid], 1);
TextDrawSetProportional(Textdraw8[playerid], 1);

Textdraw6[playerid] = TextDrawCreate(440.000000, 266.000000, "Store Name");
TextDrawBackgroundColor(Textdraw6[playerid], 255);
TextDrawFont(Textdraw6[playerid], 1);
TextDrawLetterSize(Textdraw6[playerid], 0.360000, 1.000000);
TextDrawColor(Textdraw6[playerid], -16776961);
TextDrawSetOutline(Textdraw6[playerid], 1);
TextDrawSetProportional(Textdraw6[playerid], 1);

TextDrawHideForPlayer(playerid,Textdraw0);
TextDrawHideForPlayer(playerid,Textdraw1);
TextDrawHideForPlayer(playerid,Textdraw2);
TextDrawHideForPlayer(playerid,Textdraw3);
TextDrawHideForPlayer(playerid,Textdraw4);
TextDrawHideForPlayer(playerid,Textdraw5);
TextDrawHideForPlayer(playerid,Textdraw6[playerid]);
TextDrawHideForPlayer(playerid,Textdraw7);
TextDrawHideForPlayer(playerid,Textdraw8[playerid]);
TextDrawHideForPlayer(playerid,Textdraw9);
TextDrawHideForPlayer(playerid,Textdraw10);


Now, When Player Enter Checkpoint add

R_Time[playerid] = 60;
Rob[playerid] = SetTimerEx("RobberyTime",1000,true,"i",playerid);
new shopname[] = "MY SHOP NAME";//get Shop name and change it with your shop name
new str[3];
format(str,sizeof(str),"%d",R_Time[playerid]);

TextDrawSetString(Textdraw8[playerid],str);
TextDrawSetString(Textdraw6[playerid],shopname);
TextDrawShowForPlayer(playerid,Textdraw1);
TextDrawShowForPlayer(playerid,Textdraw2);
TextDrawShowForPlayer(playerid,Textdraw3);
TextDrawShowForPlayer(playerid,Textdraw4);
TextDrawShowForPlayer(playerid,Textdraw5);
TextDrawShowForPlayer(playerid,Textdraw6[playerid]);
TextDrawShowForPlayer(playerid,Textdraw7);
TextDrawShowForPlayer(playerid,Textdraw8[playerid]);
TextDrawShowForPlayer(playerid,Textdraw9);
TextDrawShowForPlayer(playerid,Textdraw10);
TextDrawShowForPlayer(playerid,Textdraw0);


When Player leaves checkpoint(unsuccessful robbery)

SendClientMessage(playerid,-1,"Failed");
TextDrawHideForPlayer(playerid,Textdraw0);
TextDrawHideForPlayer(playerid,Textdraw1);
TextDrawHideForPlayer(playerid,Textdraw2);
TextDrawHideForPlayer(playerid,Textdraw3);
TextDrawHideForPlayer(playerid,Textdraw4);
TextDrawHideForPlayer(playerid,Textdraw5);
TextDrawHideForPlayer(playerid,Textdraw6[playerid]);
TextDrawHideForPlayer(playerid,Textdraw7);
TextDrawHideForPlayer(playerid,Textdraw8[playerid]);
TextDrawHideForPlayer(playerid,Textdraw9);
TextDrawHideForPlayer(playerid,Textdraw10);
KillTimer(Rob[playerid]);


Add this anywhere on your script.

forward RobberyTime(playerid);
public RobberyTime(playerid)
{
if(R_Time[playerid]==0)
{
SendClientMessage(playerid,-1,"Successfull");
TextDrawHideForPlayer(playerid,Textdraw0);
TextDrawHideForPlayer(playerid,Textdraw1);
TextDrawHideForPlayer(playerid,Textdraw2);
TextDrawHideForPlayer(playerid,Textdraw3);
TextDrawHideForPlayer(playerid,Textdraw4);
TextDrawHideForPlayer(playerid,Textdraw5);
TextDrawHideForPlayer(playerid,Textdraw6[playerid]);
TextDrawHideForPlayer(playerid,Textdraw7);
TextDrawHideForPlayer(playerid,Textdraw8[playerid]);
TextDrawHideForPlayer(playerid,Textdraw9);
TextDrawHideForPlayer(playerid,Textdraw10);
KillTimer(Rob[playerid]);
return 1;
}
R_Time[playerid]--;
new str[3];
format(str,sizeof(str),"%d",R_Time[playerid]);
TextDrawSetString(Textdraw8[playerid],str);
return 1;
}


GarciaBurgerShotRobbedRecently =320;
RobbingGarciaBurgerShot[playerid] =25;
IncreaseWantedLevel(playerid,4);
IncreasePlayerScore(playerid,1);
format(string,sizeof(string),"Robbing Burger Shot.\nFinish Robbery in: %d seconds.\nPolice are on the way.",RobbingGarciaBurgerShot[playerid]);
ShowPlayerDialog(playerid,DIALOG_BURGERSHOT,DIALOG _STYLE_MSGBOX,"{FF0000}Burger Shot Robbery",string,"Ok","Cancel");

format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob the Garcia Burger Shot! Get To Burger Shot and arrest the suspect.",PlayerName(playerid),playerid);
SendClientMessageToAllCops(string);

format(string,sizeof(string),"[ROBBERY] %s(%d) has begun a robbery at Burger Shot ..",PlayerName(playerid),playerid);
SendClientMessageToAll(COLOR_RED,string);

format(string,sizeof(string),"4[ROBBERY] %s(%d) has begun a robbery at Burger Shot ..",PlayerName(playerid),playerid);
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
return 1;
}



look thats the code when robbing it is a checkpoint where you do /robstore then dialogs comes out... and i dont really understand the checkpoints parts....

and i get errors from some of ur text draw thingies

C:\Users\sala\Music\Server\pawno\SFCRRPG.pwn(7) : error 017: undefined symbol "MAX_PLAYERS"
C:\Users\sala\Music\Server\pawno\SFCRRPG.pwn(9) : error 017: undefined symbol "MAX_PLAYERS"
C:\Users\sala\Music\Server\pawno\SFCRRPG.pwn(13) : error 017: undefined symbol "MAX_PLAYERS"
C:\Users\sala\Music\Server\pawno\SFCRRPG.pwn(14) : error 017: undefined symbol "MAX_PLAYERS"
C:\Users\sala\Music\Server\pawno\SFCRRPG.pwn(21) : error 017: undefined symbol "SendClientMessage"
C:\Users\sala\Music\Server\pawno\SFCRRPG.pwn(21) : warning 215: expression has no effect
C:\Users\sala\Music\Server\pawno\SFCRRPG.pwn(21) : warning 215: expression has no effect
C:\Users\sala\Music\Server\pawno\SFCRRPG.pwn(21) : warning 215: expression has no effect
C:\Users\sala\Music\Server\pawno\SFCRRPG.pwn(21) : error 001: expected token: ";", but found ")"
C:\Users\sala\Music\Server\pawno\SFCRRPG.pwn(21) : error 029: invalid expression, assumed zero
C:\Users\sala\Music\Server\pawno\SFCRRPG.pwn(21) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


8 Errors.


It is from these:
new Text:Textdraw0;
new Text:Textdraw1;
new Text:Textdraw2;
new Text:Textdraw3;
new Text:Textdraw4;
new Text:Textdraw5;
new Text:Textdraw6[MAX_PLAYERS];
new Text:Textdraw7;
new Text:Textdraw8[MAX_PLAYERS];
new Text:Textdraw9;
new Text:Textdraw10;

new R_Time[MAX_PLAYERS];
new Rob[MAX_PLAYERS];

forward RobberyTime(playerid);
public RobberyTime(playerid)
{
if(R_Time[playerid]==0)
{
SendClientMessage(playerid,-1,"Successfull");
TextDrawHideForPlayer(playerid,Textdraw0);
TextDrawHideForPlayer(playerid,Textdraw1);
TextDrawHideForPlayer(playerid,Textdraw2);
TextDrawHideForPlayer(playerid,Textdraw3);
TextDrawHideForPlayer(playerid,Textdraw4);
TextDrawHideForPlayer(playerid,Textdraw5);
TextDrawHideForPlayer(playerid,Textdraw6[playerid]);
TextDrawHideForPlayer(playerid,Textdraw7);
TextDrawHideForPlayer(playerid,Textdraw8[playerid]);
TextDrawHideForPlayer(playerid,Textdraw9);
TextDrawHideForPlayer(playerid,Textdraw10);
KillTimer(Rob[playerid]);
return 1;
}
R_Time[playerid]--;
new str[3];
format(str,sizeof(str),"%d",R_Time[playerid]);
TextDrawSetString(Textdraw8[playerid],str);
return 1;
}

SEnergy
02/08/2012, 08:14 PM
GarciaBurgerShotRobbedRecently =320;
RobbingGarciaBurgerShot[playerid] =25;
IncreaseWantedLevel(playerid,4);
IncreasePlayerScore(playerid,1);
format(string,sizeof(string),"Robbing Burger Shot.\nFinish Robbery in: %d seconds.\nPolice are on the way.",RobbingGarciaBurgerShot[playerid]);
ShowPlayerDialog(playerid,DIALOG_BURGERSHOT,DIALOG _STYLE_MSGBOX,"{FF0000}Burger Shot Robbery",string,"Ok","Cancel");

format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob the Garcia Burger Shot! Get To Burger Shot and arrest the suspect.",PlayerName(playerid),playerid);
SendClientMessageToAllCops(string);

format(string,sizeof(string),"[ROBBERY] %s(%d) has begun a robbery at Burger Shot ..",PlayerName(playerid),playerid);
SendClientMessageToAll(COLOR_RED,string);

format(string,sizeof(string),"4[ROBBERY] %s(%d) has begun a robbery at Burger Shot ..",PlayerName(playerid),playerid);
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
return 1;
}



look thats the code when robbing it is a checkpoint where you do /robstore then dialogs comes out... and i dont really understand the checkpoints parts....

and i get errors from some of ur text draw thingies

C:\Users\sala\Music\Server\pawno\SFCRRPG.pwn(7) : error 017: undefined symbol "MAX_PLAYERS"
C:\Users\sala\Music\Server\pawno\SFCRRPG.pwn(7) : error 009: invalid array size (negative, zero or out of bounds)
C:\Users\sala\Music\Server\pawno\SFCRRPG.pwn(9) : error 017: undefined symbol "MAX_PLAYERS"
C:\Users\sala\Music\Server\pawno\SFCRRPG.pwn(9) : error 009: invalid array size (negative, zero or out of bounds)
C:\Users\sala\Music\Server\pawno\SFCRRPG.pwn(13) : error 017: undefined symbol "MAX_PLAYERS"
C:\Users\sala\Music\Server\pawno\SFCRRPG.pwn(13) : error 009: invalid array size (negative, zero or out of bounds)
C:\Users\sala\Music\Server\pawno\SFCRRPG.pwn(14) : error 017: undefined symbol "MAX_PLAYERS"
C:\Users\sala\Music\Server\pawno\SFCRRPG.pwn(14) : error 009: invalid array size (negative, zero or out of bounds)
C:\Users\sala\Music\Server\pawno\SFCRRPG.pwn(21) : error 017: undefined symbol "SendClientMessage"
C:\Users\sala\Music\Server\pawno\SFCRRPG.pwn(21) : warning 215: expression has no effect
C:\Users\sala\Music\Server\pawno\SFCRRPG.pwn(21) : warning 215: expression has no effect
C:\Users\sala\Music\Server\pawno\SFCRRPG.pwn(21) : warning 215: expression has no effect
C:\Users\sala\Music\Server\pawno\SFCRRPG.pwn(21) : error 001: expected token: ";", but found ")"
C:\Users\sala\Music\Server\pawno\SFCRRPG.pwn(21) : error 029: invalid expression, assumed zero
C:\Users\sala\Music\Server\pawno\SFCRRPG.pwn(21) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


12 Errors.

It is from these:
new Text:Textdraw0;
new Text:Textdraw1;
new Text:Textdraw2;
new Text:Textdraw3;
new Text:Textdraw4;
new Text:Textdraw5;
new Text:Textdraw6[MAX_PLAYERS];
new Text:Textdraw7;
new Text:Textdraw8[MAX_PLAYERS];
new Text:Textdraw9;
new Text:Textdraw10;

new R_Time[MAX_PLAYERS];
new Rob[MAX_PLAYERS];

forward RobberyTime(playerid);
public RobberyTime(playerid)
{
if(R_Time[playerid]==0)
{
SendClientMessage(playerid,-1,"Successfull");
TextDrawHideForPlayer(playerid,Textdraw0);
TextDrawHideForPlayer(playerid,Textdraw1);
TextDrawHideForPlayer(playerid,Textdraw2);
TextDrawHideForPlayer(playerid,Textdraw3);
TextDrawHideForPlayer(playerid,Textdraw4);
TextDrawHideForPlayer(playerid,Textdraw5);
TextDrawHideForPlayer(playerid,Textdraw6[playerid]);
TextDrawHideForPlayer(playerid,Textdraw7);
TextDrawHideForPlayer(playerid,Textdraw8[playerid]);
TextDrawHideForPlayer(playerid,Textdraw9);
TextDrawHideForPlayer(playerid,Textdraw10);
KillTimer(Rob[playerid]);
return 1;
}
R_Time[playerid]--;
new str[3];
format(str,sizeof(str),"%d",R_Time[playerid]);
TextDrawSetString(Textdraw8[playerid],str);
return 1;
}

i'm sick of ppl like you, this is scripting help, for script requests there's another topic,we help ppl to fix their scripts, not to do whole scripts for them, you're lucky that this dude did it for you and you can't even fix few errors that are you telling what's wrong, how do you want to create whole gamemode if you can't fix one robbery system?

Vendicatori
02/08/2012, 08:16 PM
i'm sick of ppl like you, this is scripting help, for script requests there's another topic,we help ppl to fix their scripts, not to do whole scripts for them, you're lucky that this dude did it for you and you can't even fix few errors that are you telling what's wrong, how do you want to create whole gamemode if you can't fix one robbery system?

im not creating a gamemode i got a sfcnr server if you dont like ppls like me GTFO everybody doesnt have good scripting skills LIKE YOU BASS!

SEnergy
02/08/2012, 08:16 PM
im not creating a gamemode i got a sfcnr server if you dont like ppls like me GTFO everybody doesnt have good scripting skills LIKE YOU BASS!

asking ppl to do whole code for you won't improve your scripting skills

Vendicatori
02/08/2012, 08:26 PM
asking ppl to do whole code for you won't improve your scripting skills

and? i learn my way GTFO then if u hate peoples like me.

Vendicatori
02/08/2012, 10:26 PM
RoXoR[FS];2028184']Here is the code

Add this on top of your script.

new Text:Textdraw0;
new Text:Textdraw1;
new Text:Textdraw2;
new Text:Textdraw3;
new Text:Textdraw4;
new Text:Textdraw5;
new Text:Textdraw6[MAX_PLAYERS];
new Text:Textdraw7;
new Text:Textdraw8[MAX_PLAYERS];
new Text:Textdraw9;
new Text:Textdraw10;

new R_Time[MAX_PLAYERS];
new Rob[MAX_PLAYERS];


Under OnGameModeInIt() add

Textdraw0 = TextDrawCreate(462.000000, 201.000000, "Robbery");
TextDrawBackgroundColor(Textdraw0, 255);
TextDrawFont(Textdraw0, 0);
TextDrawLetterSize(Textdraw0, 0.900000, 3.099999);
TextDrawColor(Textdraw0, -1);
TextDrawSetOutline(Textdraw0, 1);
TextDrawSetProportional(Textdraw0, 1);

Textdraw1 = TextDrawCreate(452.000000, 220.000000, " __________________");
TextDrawAlignment(Textdraw1, 2);
TextDrawBackgroundColor(Textdraw1, 255);
TextDrawFont(Textdraw1, 1);
TextDrawLetterSize(Textdraw1, 0.500000, 1.000000);
TextDrawColor(Textdraw1, -1);
TextDrawSetOutline(Textdraw1, 0);
TextDrawSetProportional(Textdraw1, 1);
TextDrawSetShadow(Textdraw1, 1);
TextDrawUseBox(Textdraw1, 1);
TextDrawBoxColor(Textdraw1, 70);
TextDrawTextSize(Textdraw1, 644.000000, 49.000000);

Textdraw2 = TextDrawCreate(507.000000, 220.000000, " __________________");
TextDrawAlignment(Textdraw2, 2);
TextDrawBackgroundColor(Textdraw2, 255);
TextDrawFont(Textdraw2, 1);
TextDrawLetterSize(Textdraw2, 0.500000, 1.000000);
TextDrawColor(Textdraw2, -1);
TextDrawSetOutline(Textdraw2, 0);
TextDrawSetProportional(Textdraw2, 1);
TextDrawSetShadow(Textdraw2, 1);
TextDrawUseBox(Textdraw2, 1);
TextDrawBoxColor(Textdraw2, 70);
TextDrawTextSize(Textdraw2, 644.000000, 49.000000);

Textdraw3 = TextDrawCreate(562.500000, 220.000000, " __________________");
TextDrawAlignment(Textdraw3, 2);
TextDrawBackgroundColor(Textdraw3, 255);
TextDrawFont(Textdraw3, 1);
TextDrawLetterSize(Textdraw3, 0.500000, 1.000000);
TextDrawColor(Textdraw3, -1);
TextDrawSetOutline(Textdraw3, 0);
TextDrawSetProportional(Textdraw3, 1);
TextDrawSetShadow(Textdraw3, 1);
TextDrawUseBox(Textdraw3, 1);
TextDrawBoxColor(Textdraw3, 70);
TextDrawTextSize(Textdraw3, 644.000000, 49.000000);

Textdraw4 = TextDrawCreate(436.000000, 234.000000, "Robbery in progress");
TextDrawBackgroundColor(Textdraw4, 255);
TextDrawFont(Textdraw4, 1);
TextDrawLetterSize(Textdraw4, 0.400000, 1.300000);
TextDrawColor(Textdraw4, -1);
TextDrawSetOutline(Textdraw4, 1);
TextDrawSetProportional(Textdraw4, 1);

Textdraw5 = TextDrawCreate(427.000000, 256.000000, "Store:");
TextDrawBackgroundColor(Textdraw5, 255);
TextDrawFont(Textdraw5, 1);
TextDrawLetterSize(Textdraw5, 0.330000, 0.899999);
TextDrawColor(Textdraw5, -1);
TextDrawSetOutline(Textdraw5, 1);
TextDrawSetProportional(Textdraw5, 1);



Textdraw7 = TextDrawCreate(427.000000, 283.000000, "Time Remaining:");
TextDrawBackgroundColor(Textdraw7, 255);
TextDrawFont(Textdraw7, 1);
TextDrawLetterSize(Textdraw7, 0.310000, 1.199999);
TextDrawColor(Textdraw7, -1);
TextDrawSetOutline(Textdraw7, 1);
TextDrawSetProportional(Textdraw7, 1);


Textdraw9 = TextDrawCreate(473.000000, 299.000000, "seconds remaining");
TextDrawBackgroundColor(Textdraw9, 255);
TextDrawFont(Textdraw9, 1);
TextDrawLetterSize(Textdraw9, 0.330000, 1.100000);
TextDrawColor(Textdraw9, 16711935);
TextDrawSetOutline(Textdraw9, 1);
TextDrawSetProportional(Textdraw9, 1);

Textdraw10 = TextDrawCreate(430.000000, 334.000000, "Please remain in the checkpoint or else your robbery will get cancelled.");
TextDrawBackgroundColor(Textdraw10, 255);
TextDrawFont(Textdraw10, 1);
TextDrawLetterSize(Textdraw10, 0.280000, 1.300000);
TextDrawColor(Textdraw10, -1);
TextDrawSetOutline(Textdraw10, 1);
TextDrawSetProportional(Textdraw10, 1);
TextDrawUseBox(Textdraw10, 1);
TextDrawBoxColor(Textdraw10, 0);
TextDrawTextSize(Textdraw10, 598.000000, -14.000000);


Under OnPlayerConnect add

Textdraw8[playerid] = TextDrawCreate(449.000000, 300.000000, "00");
TextDrawBackgroundColor(Textdraw8[playerid], 255);
TextDrawFont(Textdraw8[playerid], 1);
TextDrawLetterSize(Textdraw8[playerid], 0.410000, 1.100000);
TextDrawColor(Textdraw8[playerid], -16776961);
TextDrawSetOutline(Textdraw8[playerid], 1);
TextDrawSetProportional(Textdraw8[playerid], 1);

Textdraw6[playerid] = TextDrawCreate(440.000000, 266.000000, "Store Name");
TextDrawBackgroundColor(Textdraw6[playerid], 255);
TextDrawFont(Textdraw6[playerid], 1);
TextDrawLetterSize(Textdraw6[playerid], 0.360000, 1.000000);
TextDrawColor(Textdraw6[playerid], -16776961);
TextDrawSetOutline(Textdraw6[playerid], 1);
TextDrawSetProportional(Textdraw6[playerid], 1);

TextDrawHideForPlayer(playerid,Textdraw0);
TextDrawHideForPlayer(playerid,Textdraw1);
TextDrawHideForPlayer(playerid,Textdraw2);
TextDrawHideForPlayer(playerid,Textdraw3);
TextDrawHideForPlayer(playerid,Textdraw4);
TextDrawHideForPlayer(playerid,Textdraw5);
TextDrawHideForPlayer(playerid,Textdraw6[playerid]);
TextDrawHideForPlayer(playerid,Textdraw7);
TextDrawHideForPlayer(playerid,Textdraw8[playerid]);
TextDrawHideForPlayer(playerid,Textdraw9);
TextDrawHideForPlayer(playerid,Textdraw10);


Now, When Player Enter Checkpoint add

R_Time[playerid] = 60;
Rob[playerid] = SetTimerEx("RobberyTime",1000,true,"i",playerid);
new shopname[] = "MY SHOP NAME";//get Shop name and change it with your shop name
new str[3];
format(str,sizeof(str),"%d",R_Time[playerid]);

TextDrawSetString(Textdraw8[playerid],str);
TextDrawSetString(Textdraw6[playerid],shopname);
TextDrawShowForPlayer(playerid,Textdraw1);
TextDrawShowForPlayer(playerid,Textdraw2);
TextDrawShowForPlayer(playerid,Textdraw3);
TextDrawShowForPlayer(playerid,Textdraw4);
TextDrawShowForPlayer(playerid,Textdraw5);
TextDrawShowForPlayer(playerid,Textdraw6[playerid]);
TextDrawShowForPlayer(playerid,Textdraw7);
TextDrawShowForPlayer(playerid,Textdraw8[playerid]);
TextDrawShowForPlayer(playerid,Textdraw9);
TextDrawShowForPlayer(playerid,Textdraw10);
TextDrawShowForPlayer(playerid,Textdraw0);


When Player leaves checkpoint(unsuccessful robbery)

SendClientMessage(playerid,-1,"Failed");
TextDrawHideForPlayer(playerid,Textdraw0);
TextDrawHideForPlayer(playerid,Textdraw1);
TextDrawHideForPlayer(playerid,Textdraw2);
TextDrawHideForPlayer(playerid,Textdraw3);
TextDrawHideForPlayer(playerid,Textdraw4);
TextDrawHideForPlayer(playerid,Textdraw5);
TextDrawHideForPlayer(playerid,Textdraw6[playerid]);
TextDrawHideForPlayer(playerid,Textdraw7);
TextDrawHideForPlayer(playerid,Textdraw8[playerid]);
TextDrawHideForPlayer(playerid,Textdraw9);
TextDrawHideForPlayer(playerid,Textdraw10);
KillTimer(Rob[playerid]);


Add this anywhere on your script.

forward RobberyTime(playerid);
public RobberyTime(playerid)
{
if(R_Time[playerid]==0)
{
SendClientMessage(playerid,-1,"Successfull");
TextDrawHideForPlayer(playerid,Textdraw0);
TextDrawHideForPlayer(playerid,Textdraw1);
TextDrawHideForPlayer(playerid,Textdraw2);
TextDrawHideForPlayer(playerid,Textdraw3);
TextDrawHideForPlayer(playerid,Textdraw4);
TextDrawHideForPlayer(playerid,Textdraw5);
TextDrawHideForPlayer(playerid,Textdraw6[playerid]);
TextDrawHideForPlayer(playerid,Textdraw7);
TextDrawHideForPlayer(playerid,Textdraw8[playerid]);
TextDrawHideForPlayer(playerid,Textdraw9);
TextDrawHideForPlayer(playerid,Textdraw10);
KillTimer(Rob[playerid]);
return 1;
}
R_Time[playerid]--;
new str[3];
format(str,sizeof(str),"%d",R_Time[playerid]);
TextDrawSetString(Textdraw8[playerid],str);
return 1;
}


C:\Users\sala\Music\Server\pawno\SFCRRPG.pwn(7) : error 017: undefined symbol "MAX_PLAYERS"
C:\Users\sala\Music\Server\pawno\SFCRRPG.pwn(9) : error 017: undefined symbol "MAX_PLAYERS"
C:\Users\sala\Music\Server\pawno\SFCRRPG.pwn(13) : error 017: undefined symbol "MAX_PLAYERS"
C:\Users\sala\Music\Server\pawno\SFCRRPG.pwn(14) : error 017: undefined symbol "MAX_PLAYERS"
C:\Users\sala\Music\Server\pawno\SFCRRPG.pwn(21) : error 017: undefined symbol "SendClientMessage"
C:\Users\sala\Music\Server\pawno\SFCRRPG.pwn(21) : warning 215: expression has no effect
C:\Users\sala\Music\Server\pawno\SFCRRPG.pwn(21) : warning 215: expression has no effect
C:\Users\sala\Music\Server\pawno\SFCRRPG.pwn(21) : warning 215: expression has no effect
C:\Users\sala\Music\Server\pawno\SFCRRPG.pwn(21) : error 001: expected token: ";", but found ")"
C:\Users\sala\Music\Server\pawno\SFCRRPG.pwn(21) : error 029: invalid expression, assumed zero
C:\Users\sala\Music\Server\pawno\SFCRRPG.pwn(21) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


8 Errors.

I get that error from the codes you gave me the first and the last... please help me i got dcmd system.

rayan khan
22/09/2012, 04:38 AM
.. hihihi .. :D