SA-MP Forums

SA-MP Forums (https://forum.sa-mp.com/index.php)
-   Scripting Help (https://forum.sa-mp.com/forumdisplay.php?f=12)
-   -   Little coding questions - For general minor queries 5 (https://forum.sa-mp.com/showthread.php?t=30938)

!damo!spiderman 28/03/2008 03:49 AM

Re: Little coding questions - For general minor queries 5
 
Read the first page.. There's a link to old topics from this..

THoM 29/03/2008 12:23 PM

Re: Little coding questions - For general minor queries 5
 
What would be the easiest way to create a poker script?
I need to define all the cards at least, but how to make so that the cards will be randoms for every player?

Just give me the functions i need, and I'll try to set it up on my own.

Regards, Thom

!damo!spiderman 29/03/2008 12:27 PM

Re: Little coding questions - For general minor queries 5
 
You'd have to write all your own functions to do this basically... cus you need to make sure that the players only get cards which are still in the pack etc. You'll need an array of all the cards etc. There's actually a few tutorials for c++ etc which explain how this could be done on the internet.. you'd just need to get the idea of what needs to happen and convert it to pawn basically

THoM 29/03/2008 01:33 PM

Re: Little coding questions - For general minor queries 5
 
Quote:

Originally Posted by !damo!spiderman
You'd have to write all your own functions to do this basically... cus you need to make sure that the players only get cards which are still in the pack etc. You'll need an array of all the cards etc. There's actually a few tutorials for c++ etc which explain how this could be done on the internet.. you'd just need to get the idea of what needs to happen and convert it to pawn basically

Thanks.

I've got another question.
What would be the closest function to force someone to use filterscript ( or something similiar )

!damo!spiderman 29/03/2008 01:37 PM

Re: Little coding questions - For general minor queries 5
 
Force someone to use it? As in load it with the gamemode?

You can use SendRconCommand() and send the string "loadfs <insert your fs name here>"

THoM 30/03/2008 09:11 AM

Re: Little coding questions - For general minor queries 5
 
Thanks spiderman, that helped a lot. I'll add it, and figure out how to get it working.

The reason why i wanted to force someone to use filterscript was, well this might sound pretty stupid since there's probably an easier way, but i wanted so that OnPlayerDeath the player will be forced to use CAM, which is a filterscript made for spectating.
Just was too lazy to create my own lol

Regards, Thom.

MATT11504 03/04/2008 08:59 PM

Re: Little coding questions - For general minor queries 5
 
im having trouble using GetPlayerWeapon.
weaponid = GetPlayerWeapon(playerid)
if (weaponid = 35)
{
SendClientMessage(playerid,COLOR_RED,"TEST");
}
but it says the weaponid = line is an invalid function or decleration and the same for l the if (weaponid = 35) line
any examples of how GetPlayerWeapon is used?

Backwardsman97 05/04/2008 04:27 AM

Re: Little coding questions - For general minor queries 5
 
Quote:

Originally Posted by MATT11504
im having trouble using GetPlayerWeapon.
pawn Code:
weaponid = GetPlayerWeapon(playerid)
if (weaponid = 35)
{
SendClientMessage(playerid,COLOR_RED,"TEST");
}
but it says the weaponid = line is an invalid function or decleration and the same for l the if (weaponid = 35) line
any examples of how GetPlayerWeapon is used?

pawn Code:
if (weaponid == 35)

Shouldn't it be like that?

Redirect Left 05/04/2008 06:55 PM

Re: Little coding questions - For general minor queries 5
 
Is there a function I can use to clone a file, but change the file name, useful for cloning players that change name ingame.
Next, is there a delete file function in PAWN?

Redirect Left 07/04/2008 11:18 AM

Re: Little coding questions - For general minor queries 5
 
No, it's usually quicker to just ask. Seeing as people here usually reply quite quick.


All times are GMT. The time now is 06:16 AM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.