[Tutorial] How to make a simple spec command [ZCMD and sscanf] [Virtual World and Interior Support]
#1

Click here to go to the updated version of this tutorial.
Reply
#2

Awesome guide, nothing less.
Reply
#3

Nice TUT!
Reply
#4

This is very usefull. keep it up dude
Reply
#5

C:\SAmp-server\Drift\gamemodes\grandlarc.pwn(90) : error 017: undefined symbol "World"
C:\SAmp-server\Drift\gamemodes\grandlarc.pwn(90) : warning 215: expression has no effect
C:\SAmp-server\Drift\gamemodes\grandlarc.pwn(90) : error 001: expected token: ";", but found "]"
C:\SAmp-server\Drift\gamemodes\grandlarc.pwn(90) : error 029: invalid expression, assumed zero
C:\SAmp-server\Drift\gamemodes\grandlarc.pwn(90) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.


-.-
Reply
#6

Sorry for that, as I said, I wasn't sure if there were any errors, providing that I did it in a rush and didn't compile it, well thanks, I fixed that.
Reply
#7

Good job Tee!

Very useful!
Reply
#8

Nice guide, but tutorials should be made without any rush, and the code should be tested before opening a thread.
Reply
#9

Quote:
Originally Posted by Delux13
View Post
Nice guide, but tutorials should be made without any rush, and the code should be tested before opening a thread.
Yea that's true but I was short on time. Anyway thanks .
Reply
#10

Good job on the tutorial, explains some stuff people need to know
Reply
#11

You didn't define color Grey, spectatorid, specid....than string in command spec and you didn't comment two lines...
I think that's all I didn't test it...

Edit: And also Float:
new Float:SpecX[MAX_PLAYERS], Float:SpecY[MAX_PLAYERS], Float:SpecZ[MAX_PLAYERS], vWorld[MAX_PLAYERS], Inter[MAX_PLAYERS];

and argument 2

Code:
public OnPlayerDisconnect(playerid, reason)
{
    if(IsBeingSpeced[playerid] == 1)//If the player being spectated, disconnects, then turn off the spec mode for the spectator.
    {
        TogglePlayerSpectating(spectatorid,0);// This justifies what's above, if it's not off then you'll be either spectating your connect screen, or somewhere in blueberry (I don't know why)
    }
    return 1;
}
Edit: I have test it, it works but dont want to re-spec user on player exit or enter vehicle....
Reply
#12

Quote:
Originally Posted by Dragony92
View Post
You didn't define color Grey, spectatorid, specid....than string in command spec and you didn't comment two lines...
I think that's all I didn't test it...

Edit: And also Float:
new Float:SpecX[MAX_PLAYERS], Float:SpecY[MAX_PLAYERS], Float:SpecZ[MAX_PLAYERS], vWorld[MAX_PLAYERS], Inter[MAX_PLAYERS];

and argument 2

Code:
public OnPlayerDisconnect(playerid, reason)
{
    if(IsBeingSpeced[playerid] == 1)//If the player being spectated, disconnects, then turn off the spec mode for the spectator.
    {
        TogglePlayerSpectating(spectatorid,0);// This justifies what's above, if it's not off then you'll be either spectating your connect screen, or somewhere in blueberry (I don't know why)
    }
    return 1;
}
Edit: I have test it, it works but dont want to re-spec user on player exit or enter vehicle....
Thanks, and the reason for re-spectating them when they exit or enter is so that you won't have to type /spec two times.
Reply
#13

Can you make a 'Back' and ''next' function too?
I have problems with that.
Reply
#14

its great tutorial TEE 10/10
+1 reput!
Reply
#15

Quote:
Originally Posted by wouter0100
View Post
Can you make a 'Back' and ''next' function too?
I have problems with that.
What do you mean? What will those do? Go to the next player and or back?

Quote:
Originally Posted by HotPlayer
View Post
its great tutorial TEE 10/10
+1 reput!
Hey, thanks for the +1 reputation
Reply
#16

Good job mate, well explained to.
Reply
#17

need help with this

C:\Program Files\Rockstar Games\GTA San Andreas\pawno\include\PPC_PlayerCommands.inc(3262) : error 017: undefined symbol "Grey"
C:\Program Files\Rockstar Games\GTA San Andreas\pawno\include\PPC_PlayerCommands.inc(3263) : error 017: undefined symbol "Grey"
C:\Program Files\Rockstar Games\GTA San Andreas\pawno\include\PPC_PlayerCommands.inc(3264) : error 017: undefined symbol "Grey"
C:\Program Files\Rockstar Games\GTA San Andreas\pawno\include\PPC_PlayerCommands.inc(3265) : error 017: undefined symbol "IsSpecing"
C:\Program Files\Rockstar Games\GTA San Andreas\pawno\include\PPC_PlayerCommands.inc(3265) : warning 215: expression has no effect
C:\Program Files\Rockstar Games\GTA San Andreas\pawno\include\PPC_PlayerCommands.inc(3265) : error 001: expected token: ";", but found "]"
C:\Program Files\Rockstar Games\GTA San Andreas\pawno\include\PPC_PlayerCommands.inc(3265) : error 029: invalid expression, assumed zero
C:\Program Files\Rockstar Games\GTA San Andreas\pawno\include\PPC_PlayerCommands.inc(3265) : fatal error 107: too many error messages on one line
Reply
#18

GetPlayerPos(playerid,SpecX[playerid],SpecY[playerid],SpecZ[playerid]); this code is giving this warning
warning 213: tag mismatch
anyone know how to fix it?
Reply
#19

if(newstate == PLAYER_STATE_ONFOOT

You missed the close bracket )

Other than that great tutorial! Another question when I do use anything with PLAYER_STATE_ONFOOT everyone get's bugged and keeps disappearing. Do you know how this is caused?
Reply
#20

With your code, only one spectator will get full advantage, since there is only one variable - spectatorid.
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)