PDA

View Full Version : [Help] With my minigame


mickos
13/06/2012, 01:46 PM
done

Jonny5
13/06/2012, 01:48 PM
new
RandomSpawn = random(3),
Float:x,
Float:y,
Float:z;


you got a comma after z

and some of the erros TELL YOU whats wrong
like


elste should be else

newbienoob
13/06/2012, 01:49 PM
It's "else", not "elste".

mickos
13/06/2012, 01:51 PM
[EDIT] 0 errors now thanks:D

But how disarm an player?

And how can I do this:

when an player try spawn a vehicle or try make an command he got this message:

You must be use /kill for use that command!

And question 2:

How disarm his weapons?

Jonny5
13/06/2012, 01:56 PM
you want to remove all his weapons or set the weapon to fists?

i dont understand the other question sorry




to remove all weapons
http://wiki.sa-mp.com/wiki/ResetPlayerWeapons

to set the weapon they are holding
http://wiki.sa-mp.com/wiki/SetPlayerArmedWeapon

newbienoob
13/06/2012, 02:02 PM
Create a variable.

new InDM[MAX_PLAYERS]; // at the top of your script under #include......

//under your vehicle spawner command
//example
if (!strcmp("/veh", cmdtext))
{
if(InDM[playerid] == 1 ) return scm(playerid,-1,"You can't spawn vehicle.");
//other codes here
//............................

//For weapons
if (!strcmp("/mg3", cmdtext))
{
ResetPlayerWeapons(playerid); //Disarm them
GivePlayerWeapon(........);// Give them a new weapon
InDM[playerid] = 1;
//other codes here.

mickos
13/06/2012, 02:14 PM
Is there are easy way?
I wanna disable all CMDS without /kill

Player can't use a command in a minigame theu must me type /kill
To come without the minigame.

How do that?

Jonny5
13/06/2012, 02:21 PM
well kinda like newbie has shown,

that way is not really that hard,

if you dont want them using ANY commands besides kill
then check for the kill command first

then run a check if they are in a DM if so return your message



if (!strcmp("/kill", cmdtext))
{
//code for kill
}
if(InDM[playerid] == 1 ) return SendClientMessage(playerid,-1,"You can't spawn vehicle.");


//all other strcmp

mickos
13/06/2012, 02:35 PM
Ah oke I understand:),
Last question:

I have some cool things just a jumper. Player can use a special jump,
How do I it false?
When I do jumper = false

I got errors

[EDIT]

I got this error:

error 035: argument type mismatch (argument 2)

When i try make this under all cmds:

if(InDM[playerid] == 1 ) return GameTextForPlayer(playerid,-1, "~y~You are in DM ~r~/kill to exit there.", 2000, 3);

mickos
13/06/2012, 04:02 PM
When I join the server and I doe /v <name> than i spawn in a vehicle,
When i join the minigame, and leave the minigame and I gonna try spawn a vehice.
Than I see a text that i have spawned a vehicle but I didnt in a vehicle and I didnt see them

whats wrong?;l

Babul
13/06/2012, 04:25 PM
maybe you forgot to reset the players' virtual world, your mp3 happens to be in world 2, so a

SetPlayerVirtualWorld(playerid, 0);

to approve that, check your vehicle spawn command, iam sure it creates a vehicle in vworld 0...

mickos
13/06/2012, 04:38 PM
Do I need put that by OnPlayerSpawn