PDA

View Full Version : Help fast, Don't ignore this please (+REP for helping)


MarkNelson
11/07/2016, 08:08 AM
hi i got this errors today and i can't fix them, So help me please :'(
C:\Users\infogenie\Desktop\Addictive Trainers 2.5.4\filterscripts\Untitled.pwn(303) : warning 203: symbol is never used: "PickedClass"
C:\Users\infogenie\Desktop\Addictive Trainers 2.5.4\filterscripts\Untitled.pwn(303) : warning 203: symbol is never used: "gPlayerClass"
C:\Users\infogenie\Desktop\Addictive Trainers 2.5.4\filterscripts\Untitled.pwn(303) : warning 203: symbol is never used: "gTeam"

i will show you the line :
CMD:snipertdm(playerid, params[])
{
SetPlayerHealth(playerid, 99999.0);
ResetPlayerWeapons(playerid);
SendClientMessage(playerid, COLOR_AQUA, "You have anti-spawn kill protection for 5 seconds.");
SetTimerEx("EndAntiSpawnKill", 5000, false, "i", playerid);
SetPlayerVirtualWorld(playerid, 0);
switch( GetPlayerTeam( playerid ) )
{
case TEAM_FARMERS:
{
SendClientMessage( playerid, COLOR_GREEN, "You are now playing in the Farmers Team." );

label7[playerid] = Create3DTextLabel("FARMERS TEAM PLAYER",TEAM_FARMERS, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(label7[playerid], playerid, 0.0, 0.0, 0.4);
}

case TEAM_ALIENS:
{
SendClientMessage( playerid, COLOR_AQUA, "You are now playing in the Aliens Team." );
label7[playerid] = Create3DTextLabel("ALIENS TEAM PLAYER",TEAM_ALIENS, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(label7[playerid], playerid, 0.0, 0.0, 0.4);

}

}
return true;
}
the line error is the final bracket. under "return true;"
HELP please :'(

Quinncell
11/07/2016, 08:11 AM
Wong code I am guessing.Anyways thats just a warning not an error, but it means you defined them but never used them.Just delete them.

Dejan12345
11/07/2016, 08:13 AM
@KeithCooper i agree

MarkNelson
11/07/2016, 08:16 AM
ok guys listen. i want team death match CMD.
When you type it you find your self in TDM but.
i need classes. i mean when someone the CMD. he find a dialog will show him two teams and he must select then teleported.
I don't know how but can someone of you guys show me simple example of it. :'(?
don't be lazy please :'(
because i tried and checked and no results

Quinncell
11/07/2016, 08:17 AM
Try searching it on this forum.I am surr there is an exaple of what you're looking for.

MarkNelson
11/07/2016, 08:18 AM
i didn't find here.
Help me please. comeon man. :'(

minijackc
11/07/2016, 08:19 AM
https://wiki.sa-mp.com/wiki/ShowPlayerDialog

Use Switch or if statements, Make classes for each opposing team

Use your brain.
Dont be lazy please.

Quinncell
11/07/2016, 08:20 AM
i didn't find here.
Help me please. comeon man. :'(

Can you explain a bit better?:) I cannot understand you in what you need.

MarkNelson
11/07/2016, 08:23 AM
Okay listen.
i want make TDM Command.
When someone type it, he will find a dialog and in this dialog there are two letters. Shows two teams.
If you selected a team from that dialog you will be teleported to the TDM map.

Dejan12345
11/07/2016, 08:28 AM
dont worry if you destroy gTeam or other you will have it in game

minijackc
11/07/2016, 08:30 AM
i wrote this in the reply section so dont give me shit if it doesn't work.. heres a start for you


#define DIALOG_TEAMS 3

In your command:

ShowPlayerDialog(playerid, DIALOG_TEAMS, DIALOG_STYLE_LIST, "Teams", "Grove\nBallas", "Teleport", "Dont TP");

OnDialogueResponse:

if(dialogid == DIALOG_TEAMS)
{
if(response)
{
switch(listitem)
{
case 0: SetPlayerPos(playerid, 0.0, 0.0, 3.0);
case 1: SetPlayerPos(playerid, 0.0, 0.0, 3.0);
}
}
return 1;
}

MarkNelson
11/07/2016, 08:31 AM
thanks mini but i need 2 teams not 3 ;) so show me one for 3

minijackc
11/07/2016, 08:32 AM
#define DIALOG_TEAMS 3

In your command:

ShowPlayerDialog(playerid, DIALOG_TEAMS, DIALOG_STYLE_LIST, "Teams", "Grove\nBallas\nWTF", "Teleport", "Dont TP");

OnDialogueResponse:

if(dialogid == DIALOG_TEAMS)
{
if(response)
{
switch(listitem)
{
case 0: SetPlayerPos(playerid, 0.0, 0.0, 3.0);
case 1: SetPlayerPos(playerid, 0.0, 0.0, 3.0);
case 2: SetPlayerPos(playerid, 0.0, 0.0, 3.0);
}
}
return 1;
}

MarkNelson
11/07/2016, 08:41 AM
now look
only a single statement (or expression) can follow each "case"
:3

minijackc
11/07/2016, 08:55 AM
Like i said, i did this in the reply box.. if you want something done try do it yourself. SAMP Documentation gives you the answers.

Stop getting spoon fed and try things yourself