Vice City Multiplayer
VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: Scripter 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
-
Well Dude My 10min is lost For you and if it Dont Help Tell me! 8)
First
When a Player Types /c arena [Name]
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
}
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
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
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
SetTimer("SetPlayerPos",5000,0);
Hope it Helps if u find Errors Pm me or post it here ouch my hand aches
Om..................... 8)
-
not works
and why !la on/of it need to be direct !La
Example just like in VCHA
-
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
-
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
-
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
-
again
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
else if(strcmp(tmp2,"wepname",true) == 0)
{
if(cash >= 0)// Desired Ticket Cash For arena
{
wepname[playerid] =1;
-
again
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
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
-
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