Need help with "PAWNO" - Printable Version +- Las Venturas Playground (https://forum.sa-mp.nl) +-- Forum: Miscellaneous (https://forum.sa-mp.nl/forum-4.html) +--- Forum: Gaming (https://forum.sa-mp.nl/forum-27.html) +--- Thread: Need help with "PAWNO" (/thread-8470.html) Pages:
1
2
|
Need help with "PAWNO" - Dust - 05-04-2008 Hey! Don't know if this is the right section or If I have the permission to create my own topic here.. but anyway.. I need some help with creating /kill command and would be super if I could get help with creating a command /teleport command, similar to the teleport system on LVP. Like /tp 8 and I spawn on the player with the id 8. I'm currently making a 16 slot freeroam server. Thank you! Re: Need help with "PAWNO" - AzTeC - 05-05-2008 Code: if(strcmp(cmdtext, "/kill", true) == 0) put this at the OnPlayercommandtext my teleport system has some bugs so i'm not posting it till i fix it Re: Need help with "PAWNO" - Jay - 05-05-2008 Code: if(strcmp(cmdtext, "/kill", true) == 0) return SetPlayerHealth(playerid,0); I suggest making a teleport script using dcmd and sscanf, as they are the easiest functions when it comes down to it. More information can be found here. Code: dcmd_teleport(playerid,params[]) Re: Need help with "PAWNO" - Dust - 05-05-2008 oh! I never belived that you guys accutally would help me ! Thank you!!! Re: Need help with "PAWNO" - Dust - 05-05-2008 ok so I've added the text you gave me.. But! I now recive warnings (374) : warning 209: function "OnPlayerCommandText" should return a value (69 : warning 203: symbol is never used: "dcmd_teleport" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase Please help me out. Re: Need help with "PAWNO" - Dimplex - 05-05-2008 post your code Re: Need help with "PAWNO" - Dust - 05-05-2008 Quote://my includes just igonre the "//" Ant this is not the whole script as you can se... *help* Would be super duper nice if someone could help me out with a car respawn command to! Re: Need help with "PAWNO" - Jay - 05-06-2008 Do what it says. OnPlayerCommandText should return 0. And you need to learn dcmd... Re: Need help with "PAWNO" - Dimplex - 05-06-2008 Let me help you , First, You must define your dcmd command, underneeth OnPlayerCommandText. So it looks like this: Code: OnPlayerCommandText(playerid, cmdtext[]) { First, you typ the name of the command that you want to use, in this case teleport dcmd(teleport,8,cmdtext); Then the system must knows how many charackters the are in the command, in teleport is that 8 dcmd(teleport,8,cmdtext); and after that you type cmdtext, to let know that it is a cmd(not for sure!!). dcmd(teleport,8,cmdtext); Okay you have made your define. You dont put you dcmd command into the OnPlayerCommandText thing, it will give errors. But past it underneeth it, like this: Code: OnPlayerCommandText(playerid, cmdtext[]) { Good luck whit it If there is anything wrong in this post, post it please. It is also new for me Grtz Dimplex Re: Need help with "PAWNO" - Dust - 05-06-2008 I don't know how to thank you, just one question, don't I have to add like a "#define cmdtext" or "include dcmd" thing? I'm gonna try to use what you gave me now, maybe it turns out I don't have to add a define/include text only for the teleport... OH and whats the color id of the car with the text "C1" ? |