Some errors needed help with
#1

moO! to all i got these errors
Код:
C:\Users\Charlie\Desktop\SAMP Server\gamemodes\BEvA51.pwn(242) : warning 211: possibly unintended assignment
C:\Users\Charlie\Desktop\SAMP Server\gamemodes\BEvA51.pwn(242) : error 001: expected token: "*then", but found ";"
C:\Users\Charlie\Desktop\SAMP Server\gamemodes\BEvA51.pwn(242) : error 036: empty statement
C:\Users\Charlie\Desktop\SAMP Server\gamemodes\BEvA51.pwn(250) : warning 211: possibly unintended assignment
C:\Users\Charlie\Desktop\SAMP Server\gamemodes\BEvA51.pwn(250) : error 001: expected token: "*then", but found ";"
C:\Users\Charlie\Desktop\SAMP Server\gamemodes\BEvA51.pwn(250) : error 036: empty statement
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
moO! they are in here
Код:
public OnPlayerSpawn(playerid)
{
	if gTeam[playerid] = TEAM_MOBSTAS;
	{
	    SetPlayerColor(playerid, 0xB8860BAA);
		SendClientMessage(playerid, COLOR_GOLD, "Type /MMission for your Mission");
  		SendClientMessage(playerid, COLOR_GOLD, "Mission is to Kill the Gangstas, They took over all of Las Venturas");
	    SendClientMessage(playerid, COLOR_GOLD, "They already took over Area 51, kill them all before they take moar!");
	    GivePlayerMoney(playerid, 25000);
 	}
	if gTeam[playerid] = TEAM_GANGSTAS;
 	{
	    SetPlayerColor(playerid, 0xDC143CAA);
	    SendClientMessage(playerid, COLOR_CRIMSON, "Type /GMission for your Mission");
	    SendClientMessage(playerid, COLOR_CRIMSON, "You took over all of Las Venturas, Kill the Mobstas from their attempt to take over Area 51");
	    SendClientMessage(playerid, COLOR_CRIMSON, "After taking over all of Las Venturas you have better supplies for attacking");
	    GivePlayerMoney(playerid, 50000);
 	}
    SendClientMessage(playerid, COLOR_LIGHTPINK, "Welcome to the War son");
	return 1;
}
moO! to all and please help mehhs
Reply
#2

if(gTeam[playerid] = TEAM_GANGSTATS)
Reply
#3

pawn Код:
C:\Users\Charlie\Desktop\SAMP Server\gamemodes\BEvA51.pwn(242) : warning 211: possibly unintended assignment
C:\Users\Charlie\Desktop\SAMP Server\gamemodes\BEvA51.pwn(242) : error 017: undefined symbol "TEAM_GANGSTATS"
C:\Users\Charlie\Desktop\SAMP Server\gamemodes\BEvA51.pwn(250) : warning 211: possibly unintended assignment
C:\Users\Charlie\Desktop\SAMP Server\gamemodes\BEvA51.pwn(250) : error 017: undefined symbol "TEAM_GANGSTATS"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
mOO!
Reply
#4

if(gTeam[playerid] = TEAM_GANGSTAS)
Reply
#5

How hard was that ¬_¬
Reply
#6

Quote:
Originally Posted by CAR
Посмотреть сообщение
if(gTeam[playerid] = TEAM_GANGSTAS)
Isnt it:
pawn Код:
if(gTeam[playerid] == TEAM_GANGSTAS)
{
//Code Here
}
else
{
//Code Here
}
Reply
#7

Yes, it is.

(So how hard was that, Hiddos =p)
Reply
#8

moO!
pawn Код:
C:\Users\Charlie\Desktop\SAMP Server\gamemodes\BEvA51.pwn(242) : warning 211: possibly unintended assignment
C:\Users\Charlie\Desktop\SAMP Server\gamemodes\BEvA51.pwn(250) : warning 211: possibly unintended assignment
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Warnings.
And here is the lines
pawn Код:
public OnPlayerSpawn(playerid)
{
    if(gTeam[playerid] = TEAM_MOBSTAS)
    {
        SetPlayerColor(playerid, 0xB8860BAA);
        SendClientMessage(playerid, COLOR_GOLD, "Type /MMission for your Mission");
        SendClientMessage(playerid, COLOR_GOLD, "Mission is to Kill the Gangstas, They took over all of Las Venturas");
        SendClientMessage(playerid, COLOR_GOLD, "They already took over Area 51, kill them all before they take moar!");
        GivePlayerMoney(playerid, 25000);
    }
    if(gTeam[playerid] = TEAM_GANGSTAS)
    {
        SetPlayerColor(playerid, 0xDC143CAA);
        SendClientMessage(playerid, COLOR_CRIMSON, "Type /GMission for your Mission");
        SendClientMessage(playerid, COLOR_CRIMSON, "You took over all of Las Venturas, Kill the Mobstas from their attempt to take over Area 51");
        SendClientMessage(playerid, COLOR_CRIMSON, "After taking over all of Las Venturas you have better supplies for attacking");
        GivePlayerMoney(playerid, 50000);
    }   //ignore from the }
    SendClientMessage(playerid, COLOR_LIGHTPINK, "Welcome to the War son");
    return 1;
}
and here are the pictures from when meh enteh

This is Mobstas

http://yfrog.com/5msamp20100710113558j

This is the Gangstas

http://yfrog.com/7gsamp20100710113612j

mOO! they need to say this...

mobstas:
pawn Код:
SendClientMessage(playerid, COLOR_GOLD, "Type /MMission for your Mission");
        SendClientMessage(playerid, COLOR_GOLD, "Mission is to Kill the Gangstas, They took over all of Las Venturas");
        SendClientMessage(playerid, COLOR_GOLD, "They already took over Area 51, kill them all before they take moar!");
and Gangstas:
pawn Код:
SendClientMessage(playerid, COLOR_CRIMSON, "Type /GMission for your Mission");
        SendClientMessage(playerid, COLOR_CRIMSON, "You took over all of Las Venturas, Kill the Mobstas from their attempt to take over Area 51");
        SendClientMessage(playerid, COLOR_CRIMSON, "After taking over all of Las Venturas you have better supplies for attacking");
moO!
Reply
#9

Did you change this:
if(gTeam[playerid] = TEAM_MOBSTAS)
to this:
if(gTeam[playerid] == TEAM_MOBSTAS)

and this:
if(gTeam[playerid] = TEAM_GANGSTAS)
to this:
if(gTeam[playerid] == TEAM_GANGSTAS)
Reply
#10

Quote:
Originally Posted by Grim_
Посмотреть сообщение
Did you change this:
if(gTeam[playerid] = TEAM_MOBSTAS)
to this:
if(gTeam[playerid] == TEAM_MOBSTAS)

and this:
if(gTeam[playerid] = TEAM_GANGSTAS)
to this:
if(gTeam[playerid] == TEAM_GANGSTAS)
moO! thanks it works now will include in credits when post GM^^

EDIT:You think you might be able to help me with this?? i wanna make it so when the player dies it shows
"%s has died (reason)"

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    new string[256];
    new playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid,playername,sizeof(playername));
    format(string, sizeof(string),"%s has Died",playername, reason);
    SendClientMessageToAll(0x00FF32FF,string);
    return 1;
}
Reply
#11

Thanks but not needed.

(Also, Miikkel was the one that pointed it out )
Reply
#12

Quote:
Originally Posted by Grim_
Посмотреть сообщение
Thanks but not needed.

(Also, Miikkel was the one that pointed it out )
mOO! can u get this??

You think you might be able to help me with this?? i wanna make it so when the player dies it shows
"%s has died (reason)"

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    new string[256];
    new playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid,playername,sizeof(playername));
    format(string, sizeof(string),"%s has Died",playername, reason);
    SendClientMessageToAll(0x00FF32FF,string);
    return 1;
}
Reply
#13

If you want the name of the weapon:
pawn Код:
// Under #include <a_samp>
// and above main()
new aWeaponNames[][32] = {
    {"Unarmed (Fist)"}, // 0
    {"Brass Knuckles"}, // 1
    {"Golf Club"}, // 2
    {"Night Stick"}, // 3
    {"Knife"}, // 4
    {"Baseball Bat"}, // 5
    {"Shovel"}, // 6
    {"Pool Cue"}, // 7
    {"Katana"}, // 8
    {"Chainsaw"}, // 9
    {"Purple Dildo"}, // 10
    {"Big White Vibrator"}, // 11
    {"Medium White Vibrator"}, // 12
    {"Small White Vibrator"}, // 13
    {"Flowers"}, // 14
    {"Cane"}, // 15
    {"Grenade"}, // 16
    {"Teargas"}, // 17
    {"Molotov"}, // 18
    {" "}, // 19
    {" "}, // 20
    {" "}, // 21
    {"Colt 45"}, // 22
    {"Colt 45 (Silenced)"}, // 23
    {"Desert Eagle"}, // 24
    {"Normal Shotgun"}, // 25
    {"Sawnoff Shotgun"}, // 26
    {"Combat Shotgun"}, // 27
    {"Micro Uzi (Mac 10)"}, // 28
    {"MP5"}, // 29
    {"AK47"}, // 30
    {"M4"}, // 31
    {"Tec9"}, // 32
    {"Country Rifle"}, // 33
    {"Sniper Rifle"}, // 34
    {"Rocket Launcher"}, // 35
    {"Heat-Seeking Rocket Launcher"}, // 36
    {"Flamethrower"}, // 37
    {"Minigun"}, // 38
    {"Satchel Charge"}, // 39
    {"Detonator"}, // 40
    {"Spray Can"}, // 41
    {"Fire Extinguisher"}, // 42
    {"Camera"}, // 43
    {"Night Vision Goggles"}, // 44
    {"Infrared Vision Goggles"}, // 45
    {"Parachute"}, // 46
    {"Fake Pistol"} // 47
};

// In OnPlayerDeath
new string[50];
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));
format(string, sizeof(string), "%s has died (%s)", playername, aWeaponNames[reason]);
SendClientMessageToAll(0x00FF32FF, string);
Try that out and get back to me.
Reply
#14

moO! xD it works just not when you SPLAT!! lol xD

check back in about 3 - 5 mins i may have something else posted or just check for a new thread

EDIT:I got something new! xD
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    SendClientMessage(playerid, COLOR_INTERFACE, "You have entered a Vehicle");
    return 1;
}
How to make it so that when you enter the car it says "you have entered a vehicle (vehicle)"

it has something to do with

pawn Код:
new VehID=GetPlayerVehicleID(playerid);
if(VehID>0)
{
Reply
#15

OnPlayerDeath with reason (and Splat):
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    new string[256];
    new playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid,playername,sizeof(playername));
    if(killerid == INVALID_PLAYER_ID) { reason = "Splat"; }
    else { GetWeaponName(reason, weap, sizeof(weap)); }
    format(string, sizeof(string),"%s has Died (reason)",playername, reason);
    SendClientMessageToAll(0x00FF32FF,string);
    return 1;
}
OnPlayerEnterVehicle with vehicleid
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    new string[128];
    format(string, sizeof(string), "You have entered a Vehicle (%d)", vehicleid);
    SendClientMessage(playerid, COLOR_INTERFACE, string);
    return 1;
}
Reply
#16

Quote:
Originally Posted by CAR
Посмотреть сообщение
OnPlayerDeath with reason (and Splat):
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    new string[256];
    new playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid,playername,sizeof(playername));
    if(killerid == INVALID_PLAYER_ID) { reason = "Splat"; }
    else { GetWeaponName(reason, weap, sizeof(weap)); }
    format(string, sizeof(string),"%s has Died (reason)",playername, reason);
    SendClientMessageToAll(0x00FF32FF,string);
    return 1;
}
OnPlayerEnterVehicle with vehicleid
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    new string[128];
    format(string, sizeof(string), "You have entered a Vehicle (%d)", vehicleid);
    SendClientMessage(playerid, COLOR_INTERFACE, string);
    return 1;
}
moO! they both failed.. The vehicles one just straight up gave errors about undefined sysmbols "vehiclename" or something like that and same with the death message..!>
Reply
#17

I didn't use vehiclename?
Reply
#18

Quote:
Originally Posted by CAR
Посмотреть сообщение
I didn't use vehiclename?
i kno lol i tried
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    new string[128];
    format(string, sizeof(string), "You have entered a Vehicle (%d)", vehicleid);
    SendClientMessage(playerid, COLOR_INTERFACE, string);
    return 1;
}
Reply
#19

@ willsuckformoney ... stop, think and try to script what you want first before posting question after question after question. You will never learn if you don't try.

If you don't want to try, get on your knees and start sucking. That way you can pay for a scripter.
Reply
#20

Quote:
Originally Posted by Betamaster
Посмотреть сообщение
@ willsuckformoney ... stop, think and try to script what you want first before posting question after question after question. You will never learn if you don't try.

If you don't want to try, get on your knees and start sucking. That way you can pay for a scripter.
moO! to u RaGiNg over me asking some questions with things i don't know anything about yet.... btw I'm working on another GM atm with this stuff just to let you know i didn't just start scripting

now how about you get on your knees and give daddy what he wants?!?! xD
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)