Author Topic: Help me guys!!!!!!!  (Read 4356 times)

0 Members and 1 Guest are viewing this topic.

Offline Scripter

  • Wiseguy
  • **
  • Posts: 62
    • View Profile
Help me guys!!!!!!!
« on: March 29, 2011, 11:02:12 am »
i am new in scripting so that's why i don't know so much

iam making !arena wepname
like in hunting arena i maked it but 1 problem
when player died he need to join auto bcz he didn't did !la

how to set in
public OnPlayerSpawn(playerid,classid,teamid)

how to set it auto that if player did !arena stubby and if he died in arena if he  respawn than he need to join auto bcz he didnt did !la
but if he did !la then not
plz

yazeen

  • Guest
Re: Help me guys!!!!!!!
« Reply #1 on: March 29, 2011, 12:20:31 pm »
Well Dude My 10min is lost For you and if it Dont Help Tell me!  8)

First
When a Player Types /c arena [Name]

Code: [Select]
else if(strcmp(cmd,"arena",true) == 0)
{
new param[256];
    cmd2 = strtok(cmdtext,idx);
new cash;
if(la[playerid] = 1)
if(!strlen(tmp2))
cash = GetPlayerMoney(playerid);
{

    //Follow This Format
        else if(strcmp(cmd2,"wepname",true) == 0)
{
if(cash >= 0)// Desired Ticket Cash For arena
{
    wepname[playerid] =1;
      m4[playerid] =0;
   colt[playerid] =0;
   shotgun[playerid] =0;
   uzi[playerid] =0;
   shotgun[playerid] =0;
SetPlayerWeapon(playerid,0,0); // Here Wepname and Wep Ammo
SendClientMessage(playerid,COLOR_BLUE,"You Entered The [wepname] arena");
SetPlayerMoney(playerid,cash-0); //minus here the Cash you wrote on top
SetPlayerPos(playerid,XYZCoords);
}
}
if(strcmp(cmd2,"m4",true) == 0)
{
if(cash >= 200)
{
spaz[playerid] =0;
m4[playerid] =1;
colt[playerid] =0;
uzi[playerid] =0;
shotgun[playerid] =0;
SetPlayerWeapon(playerid,26,120);
SendClientMessage(playerid,COLOR_BLUE,"You Entered The Shotgun arena");
SetPlayerMoney(playerid,cash-200);
SetPlayerPos(playerid,XYZCoords);
}
}

else if(strcmp(cmd2,"uzi",true) == 0)
{
if(cash >= 100)
{
spaz[playerid] =0;
m4[playerid] =0;
colt[playerid] =0;
uzi[playerid] =1;
shotgun[playerid] =0;
SetPlayerWeapon(playerid,23,120);
SendClientMessage(playerid,COLOR_BLUE,"You Entered The uzi arena");
SetPlayerMoney(playerid,cash-100);
SetPlayerPos(playerid,XYZCoords);
}
}

else if(strcmp(cmd2,"shotgun",true) == 0)
{
if(cash >= 340)
{
spaz[playerid] =0;
m4[playerid] =0;
colt[playerid] =0;
uzi[playerid] =0;
shotgun[playerid] =1;
SetPlayerWeapon(playerid,19,120);
SendClientMessage(playerid,COLOR_BLUE,"You Entered The Shotgun arena");
SetPlayerMoney(playerid,cash-340);
SetPlayerPos(playerid,XYZCoords);
}
}

else if(strcmp(cmd2,"spaz",true) == 0)
{
if(cash >= 500)
{
spaz[playerid] =1;
m4[playerid] =0;
colt[playerid] =0;
shotgun[playerid] =0;
uzi[playerid] =0;
shotgun[playerid] =0;
SetPlayerWeapon(playerid,20,120);
SendClientMessage(playerid,COLOR_BLUE,"You Entered The spaz arena");
SetPlayerMoney(playerid,cash-500);
SetPlayerPos(playerid,XYZCoords);
}
}

else if(strcmp(cmd2,"colt",true) == 0)
{
if(cash >= 50)
{
    spaz[playerid] =0;
m4[playerid] =0;
colt[playerid] =1;
shotgun[playerid] =0;
uzi[playerid] =0;
shotgun[playerid] =0;
SetPlayerWeapon(playerid,17,120);
SendClientMessage(playerid,COLOR_BLUE,"You Entered The colt47 arena");
SetPlayerMoney(playerid,cash-50);
SetPlayerPos(playerid,XYZCoords);
}
}
else
{
SendClientMessage(playerid,COLOR_RED,"Error: /c Arena [ArenaName]");
}
}
else
{
SendClientMessage(playerid,COLOR_RED,"You Have Disabled Last Arena!");
}
 return 1;
 }

Second
If Player Enabled/Disabled Last Arena

Code: [Select]
}
else if (strcmp(cmd, "la", true) == 0) {
tmp = strtok(cmdtext, idx);
if (!strlen(tmp)) SendClientMessage(playerid,COLOR_GREEN,"USAGE: /c la [on/off]");
else {
    if(strcmp(tmp, "on", true) == 0) {
SendClientMessage(playerid,COLOR_GREEN,"Last Arena Has Been Enabled.");
la[playerid] = 1;
format(file, sizeof(file), USERS_FILE, gPlayers[playerid]);
dini_Set(file, "Nola", "1");
}
else if(strcmp(tmp, "off", true) == 0) {
SendClientMessage(playerid,COLOR_GREEN,"Last Arena has Been Disabled.");
la[playerid] = 0;
format(file, sizeof(file), USERS_FILE, gPlayers[playerid]);
dini_Set(file, "Nola", "0");
}
else SendClientMessage(playerid,COLOR_GREEN,"Error: /c la [on/off]");
}
return 1;
}

Third
When A Player Dies Redirect to the last Arena
Add This on PublicOnPlayerSpawn

Code: [Select]
if(spaz[playerid] = 1) //
 else if(la[playerid] =1)
{
SetPlayerWeapon(playerid,0,0); //
SendClientMessage(playerid,COLOR_BLUE,"You Have Been Redirected The spaz arena");
SetPlayerPos(playerid,XYZCoords);
  {
  {
if(colt[playerid] = 1) //
 else if(la[playerid] =1)
{
SetPlayerWeapon(playerid,0,0); //
SendClientMessage(playerid,COLOR_BLUE,"You Have Been Redirected The colt arena");
SetPlayerPos(playerid,XYZCoords);
{
  {
  if(m4[playerid] = 1) //
 else if(la[playerid] =1)
{
SetPlayerWeapon(playerid,0,0); //
SendClientMessage(playerid,COLOR_BLUE,"You Have Been Redirected The m4 arena");
SetPlayerPos(playerid,XYZCoords);
{
  {
if(uzi[playerid] = 1) //
 else if(la[playerid] =1)
{
SetPlayerWeapon(playerid,0,0); //
SendClientMessage(playerid,COLOR_BLUE,"You Have Been Redirected The uzi arena");
SetPlayerPos(playerid,XYZCoords);
{
  {
  if(shotgun[playerid] = 1) //
 else if(la[playerid] =1)
{
SetPlayerWeapon(playerid,0,0); //
SendClientMessage(playerid,COLOR_BLUE,"You Have Been Redirected The shotgun arena");
SetPlayerPos(playerid,XYZCoords);
  {
  {
  {
  return 1;
  }

Forth
Add This ON TOP if u dont add this it shows Full Errors

Code: [Select]
new Shotgun[MAX_PLAYERS];
  new colt[MAX_PLAYERS];
  new la[MAX_PLAYERS];
  new spaz[MAX_PLAYERS];
  new m4[MAX_PLAYERS];
  new uzi[MAX_PLAYERS];

Final
Well, I Realy Dont know to Use Timer Function Ask anyone Who knows More about timer Function
if it shows error Delete this. This is used to avoid Death Evade

On Gamemodeint
Code: [Select]
SetTimer("SetPlayerPos",5000,0);

Hope it Helps if u find Errors Pm me or post it here ouch my hand aches
Om.....................               8)

Offline Scripter

  • Wiseguy
  • **
  • Posts: 62
    • View Profile
Re: Help me guys!!!!!!!
« Reply #2 on: March 29, 2011, 01:22:21 pm »
not works
and why !la on/of it need to be direct !La  
Example just like in VCHA
« Last Edit: March 29, 2011, 01:28:25 pm by Scripter »

yazeen

  • Guest
Re: Help me guys!!!!!!!
« Reply #3 on: March 29, 2011, 01:26:50 pm »
not works
and why !la on/of it need to be direct !La 
Example just like in VCHA

Show me Errors la on/off if on it will direct to last arena if no it will not do anything

Show me the list of errors plse

Offline Scripter

  • Wiseguy
  • **
  • Posts: 62
    • View Profile
Re: Help me guys!!!!!!!
« Reply #4 on: March 29, 2011, 01:30:06 pm »
Code: [Select]
G:\MY server\gamemodes\JS.pwn(2593) : error 017: undefined symbol "cmd2"
G:\MY server\gamemodes\JS.pwn(2595) : warning 211: possibly unintended assignment
G:\MY server\gamemodes\JS.pwn(2596) : error 017: undefined symbol "tmp2"
G:\MY server\gamemodes\JS.pwn(2601) : error 029: invalid expression, assumed zero
G:\MY server\gamemodes\JS.pwn(2601) : warning 215: expression has no effect
G:\MY server\gamemodes\JS.pwn(2601) : error 001: expected token: ";", but found "if"
G:\MY server\gamemodes\JS.pwn(2601) : error 017: undefined symbol "cmd2"
G:\MY server\gamemodes\JS.pwn(2601) : fatal error 107: too many error messages on one line

yazeen

  • Guest
Re: Help me guys!!!!!!!
« Reply #5 on: March 29, 2011, 01:36:19 pm »
Code: [Select]
G:\MY server\gamemodes\JS.pwn(2593) : error 017: undefined symbol "cmd2"
G:\MY server\gamemodes\JS.pwn(2595) : warning 211: possibly unintended assignment
G:\MY server\gamemodes\JS.pwn(2596) : error 017: undefined symbol "tmp2"
G:\MY server\gamemodes\JS.pwn(2601) : error 029: invalid expression, assumed zero
G:\MY server\gamemodes\JS.pwn(2601) : warning 215: expression has no effect
G:\MY server\gamemodes\JS.pwn(2601) : error 001: expected token: ";", but found "if"
G:\MY server\gamemodes\JS.pwn(2601) : error 017: undefined symbol "cmd2"
G:\MY server\gamemodes\JS.pwn(2601) : fatal error 107: too many error messages on one line



Use

new tmp2[256];

and if i used if instead of else if change it

Offline Scripter

  • Wiseguy
  • **
  • Posts: 62
    • View Profile
Re: Help me guys!!!!!!!
« Reply #6 on: March 29, 2011, 01:50:47 pm »
again
Code: [Select]
C:\Documents and Settings\Sarang Butt\Desktop\JS.pwn(2601) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Sarang Butt\Desktop\JS.pwn(2601) : warning 215: expression has no effect
C:\Documents and Settings\Sarang Butt\Desktop\JS.pwn(2601) : error 001: expected token: ";", but found "if"
C:\Documents and Settings\Sarang Butt\Desktop\JS.pwn(2605) : error 017: undefined symbol "wepname"
C:\Documents and Settings\Sarang Butt\Desktop\JS.pwn(2605) : warning 215: expression has no effect
C:\Documents and Settings\Sarang Butt\Desktop\JS.pwn(2605) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Sarang Butt\Desktop\JS.pwn(2605) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Sarang Butt\Desktop\JS.pwn(2605) : fatal error 107: too many error messages on one line

errors are in this line

Code: [Select]
else if(strcmp(tmp2,"wepname",true) == 0)
{
if(cash >= 0)// Desired Ticket Cash For arena
{
    wepname[playerid] =1;

yazeen

  • Guest
Re: Help me guys!!!!!!!
« Reply #7 on: March 29, 2011, 01:56:16 pm »
again
Code: [Select]
C:\Documents and Settings\Sarang Butt\Desktop\JS.pwn(2601) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Sarang Butt\Desktop\JS.pwn(2601) : warning 215: expression has no effect
C:\Documents and Settings\Sarang Butt\Desktop\JS.pwn(2601) : error 001: expected token: ";", but found "if"
C:\Documents and Settings\Sarang Butt\Desktop\JS.pwn(2605) : error 017: undefined symbol "wepname"
C:\Documents and Settings\Sarang Butt\Desktop\JS.pwn(2605) : warning 215: expression has no effect
C:\Documents and Settings\Sarang Butt\Desktop\JS.pwn(2605) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Sarang Butt\Desktop\JS.pwn(2605) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Sarang Butt\Desktop\JS.pwn(2605) : fatal error 107: too many error messages on one line

errors are in this line

Code: [Select]
else if(strcmp(tmp2,"wepname",true) == 0)
{
if(cash >= 0)// Desired Ticket Cash For arena
{
    wepname[playerid] =1;

Didnt u Understant its Format man wepname mean write the weapon name u want and cash > = the cash u want has ticket to join and wepname[playerid] is the wepname you added OMG LEARN ENGLISH THEN LEARN PAWNO

Offline Scripter

  • Wiseguy
  • **
  • Posts: 62
    • View Profile
Re: Help me guys!!!!!!!
« Reply #8 on: March 29, 2011, 05:48:25 pm »
lol u didn't write at up anything
so thats why i didn't did any editing
and by the why iam new in scripting
and i was waiting for madara rply

and learn some manners

ahh noob script when i fix one error then comes new errors
and errors keep coming
so many errors in one cmd

only madara can help me
« Last Edit: March 29, 2011, 06:30:48 pm by Scripter »