SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 15/07/2018, 11:09 AM   #1
IdonTmiss
Big Clucker
 
Join Date: Dec 2016
Posts: 145
Reputation: 0
Default Define/stock question

Well should i use , is it just the same or am i stupid?

pawn Code:
stock Error(playerid, string[]) return va_SendClientMessage(playerid, RED_COLOR, "ERROR: {FFFFFF}%s", string);
//

//Then for a command

if(PlayerInfo[pAdmin] < 1) return Error(playerid, "U can't use this command!");

//or just like this
if(PlayerInfo[pAdmin] < 1) return va_SendClientMessage(playerid, RED_COLOR, "ERROR: U can't use this command!");
IdonTmiss is offline   Reply With Quote
Old 15/07/2018, 11:20 AM   #2
IdonTmiss
Big Clucker
 
Join Date: Dec 2016
Posts: 145
Reputation: 0
Default Re: Define/stock question

Quote:
Originally Posted by ****** View Post
Neither, this function doesn't need to be stock.
So just use this for commands and returns in them?

pawn Code:
va_SendClientMessage(playerid, RED_COLOR, "ERROR: U can't use this command!");
IdonTmiss is offline   Reply With Quote
Old 15/07/2018, 11:31 AM   #3
IdonTmiss
Big Clucker
 
Join Date: Dec 2016
Posts: 145
Reputation: 0
Default Re: Define/stock question

Quote:
Originally Posted by ****** View Post
I'd suggest you spell "you" correctly, but otherwise yes. However, that's not quite what I meant - the `Error` function doesn't need `stock` before it.
I don't even use this in my script I mean the text, but thanks since I already reverted everything into the va_SendClient.. I'll leave it like that, Thanks !
IdonTmiss is offline   Reply With Quote
Old 15/07/2018, 12:56 PM   #4
GhostHacker9
Big Clucker
 
GhostHacker9's Avatar
 
Join Date: Jan 2017
Location: New Zealand
Posts: 105
Reputation: 109
Default Re: Define/stock question

Quote:
Originally Posted by ****** View Post
I'd suggest you spell "you" correctly
I'd suggest you spell "why" correctly
GhostHacker9 is offline   Reply With Quote
Old 15/07/2018, 01:52 PM   #5
Garr
Big Clucker
 
Join Date: Feb 2014
Posts: 51
Reputation: 29
Default Re: Define/stock question

Quote:
Originally Posted by IdonTmiss View Post
I don't even use this in my script I mean the text, but thanks since I already reverted everything into the va_SendClient.. I'll leave it like that, Thanks !
He's saying you don't need to use the stock keyword. Just create a regular function lol.
Garr 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
stock vs define Yera96 Scripting Help 7 21/10/2014 04:03 AM
Stock or define function help needed. Epicless Scripting Help 6 17/11/2013 10:44 PM
[Ajuda] Transformar uma stock em define BrasileiroGamer Português/Portuguese 4 12/08/2013 02:25 AM
Using #define Instead of Stock here Swimor Scripting Help 10 25/05/2013 07:30 PM
Define a truck in stock. Why Scripting Help 5 21/07/2012 10:51 PM


All times are GMT. The time now is 04:32 PM.


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