SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 28/03/2008, 04:49 AM   #21
!damo!spiderman
Huge Clucker
 
!damo!spiderman's Avatar
 
Join Date: Oct 2006
Posts: 469
Reputation: 147
Default Re: Little coding questions - For general minor queries 5

Read the first page.. There's a link to old topics from this..
__________________
!damo!spiderman is offline   Reply With Quote
Old 29/03/2008, 01:23 PM   #22
THoM
Little Clucker
 
Join Date: Sep 2006
Posts: 10
Reputation: 0
Default 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
THoM is offline   Reply With Quote
Old 29/03/2008, 01:27 PM   #23
!damo!spiderman
Huge Clucker
 
!damo!spiderman's Avatar
 
Join Date: Oct 2006
Posts: 469
Reputation: 147
Default 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
__________________
!damo!spiderman is offline   Reply With Quote
Old 29/03/2008, 02:33 PM   #24
THoM
Little Clucker
 
Join Date: Sep 2006
Posts: 10
Reputation: 0
Default 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 )
THoM is offline   Reply With Quote
Old 29/03/2008, 02:37 PM   #25
!damo!spiderman
Huge Clucker
 
!damo!spiderman's Avatar
 
Join Date: Oct 2006
Posts: 469
Reputation: 147
Default 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>"
__________________
!damo!spiderman is offline   Reply With Quote
Old 30/03/2008, 10:11 AM   #26
THoM
Little Clucker
 
Join Date: Sep 2006
Posts: 10
Reputation: 0
Default 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.
THoM is offline   Reply With Quote
Old 03/04/2008, 09:59 PM   #27
MATT11504
Little Clucker
 
Join Date: Nov 2007
Posts: 43
Reputation: 0
Default 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?
MATT11504 is offline   Reply With Quote
Old 05/04/2008, 05:27 AM   #28
Backwardsman97
High-roller
 
Backwardsman97's Avatar
 
Join Date: Nov 2007
Posts: 2,201
Reputation: 36
Default Re: Little coding questions - For general minor queries 5

Quote:
Originally Posted by MATT11504
im having trouble using GetPlayerWeapon.
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?
Code:
if (weaponid == 35)

Shouldn't it be like that?
Backwardsman97 is offline   Reply With Quote
Old 05/04/2008, 07:55 PM   #29
Redirect Left
High-roller
 
Redirect Left's Avatar
 
Join Date: Mar 2007
Location: Yorkshire, England
Posts: 1,281
Reputation: 358
Default 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 is offline   Reply With Quote
Old 07/04/2008, 12:18 PM   #30
Redirect Left
High-roller
 
Redirect Left's Avatar
 
Join Date: Mar 2007
Location: Yorkshire, England
Posts: 1,281
Reputation: 358
Default 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.
Redirect Left is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to make a soldier aotumaticly be general when the general dies ? AlbanianGuy Scripting Help 35 13/05/2012 04:35 PM
Minor problem Desert Help Archive 4 17/03/2010 07:24 PM
Counting with mysql queries actiwe Help Archive 2 26/02/2010 03:36 PM
SQL queries using GROUP BY Dabombber Help Archive 2 05/10/2009 08:47 PM


All times are GMT. The time now is 05:45 AM.


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