SA-MP Forums Archive
[Help] With my minigame - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [Help] With my minigame (/showthread.php?tid=350667)



[Help] With my minigame - mickos - 13.06.2012

done


Re: [Help] With my minigame - Jonny5 - 13.06.2012

pawn Код:
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

pawn Код:
elste   should be else



Re: [Help] With my minigame - newbienoob - 13.06.2012

It's "else", not "elste".


Re: [Help] With my minigame - mickos - 13.06.2012

[EDIT] 0 errors now thanks

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?


Re: [Help] With my minigame - Jonny5 - 13.06.2012

you want to remove all his weapons or set the weapon to fists?

i dont understand the other question sorry




to remove all weapons
https://sampwiki.blast.hk/wiki/ResetPlayerWeapons

to set the weapon they are holding
https://sampwiki.blast.hk/wiki/SetPlayerArmedWeapon


Re: [Help] With my minigame - newbienoob - 13.06.2012

Create a variable.
pawn Код:
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.



Re: [Help] With my minigame - mickos - 13.06.2012

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?


Re: [Help] With my minigame - Jonny5 - 13.06.2012

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


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


//all other strcmp



Re: [Help] With my minigame - mickos - 13.06.2012

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:

PHP код:
error 035argument type mismatch (argument 2
When i try make this under all cmds:

PHP код:
if(InDM[playerid] == ) return GameTextForPlayer(playerid,-1"~y~You are in DM ~r~/kill to exit there."20003); 



Re: [Help] With my minigame - mickos - 13.06.2012

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


Re: [Help] With my minigame - Babul - 13.06.2012

maybe you forgot to reset the players' virtual world, your mp3 happens to be in world 2, so a
pawn Code:
SetPlayerVirtualWorld(playerid, 0);
to approve that, check your vehicle spawn command, iam sure it creates a vehicle in vworld 0...


Re: [Help] With my minigame - mickos - 13.06.2012

Do I need put that by OnPlayerSpawn