Search

open.mp forum

RegisterLogin

Discussion

General
Chat
Tech
Life
Art
Programming
open.mp
Development Updates
Questions and Suggestions
SA-MP
General Discussions
Videos and Screenshots
Support
Pawn Scripting
Tutorials
Releases
Plugins
Libraries
Filterscripts
Gamemodes
Maps
Advertisements
Other languages
Spanish/Espa?ol
Programaci?n
Discusi?n GTA SA Multijugador
Mods
Offtopic
Juegos
Portuguese/Portugu?s
Russian/???????
Italian/Italiano
Dutch/Nederlands
German/Deutsch
Romanian/Rom?na
Ex-Yu
Polish/Polski
Og?lne
Serwery
Skryptowanie
Filmiki i zdjecia
Lithuanian/Lietuvi?kas
French/Fran?ais
Hungarian/Magyar
Hindi/Urdu
Turkish
Other
Internal
Team
Hidden
Archived

Library

 Collections Links Members Roles

Post your code snippets here

I remember seeing a thread like this on SA-MP forums so it'd be nice to share with each other little tricks to making our lives...

ID
d6ouivfilegovhg7b550
author
dtv's avatar

DTV

@dtv


View profile
Copy link
  Report member
started
Apr 14, 2019
replies
0
participating
No

scroll to top

powered by storyden

Login
Discussion
Pawn Scripting
Post your code snippets here
dtv's avatar

DTV

@dtv


View profile
Copy link
  Report member
• 7y
Pawn Scripting

Post your code snippets here

pawn

I remember seeing a thread like this on SA-MP forums so it'd be nice to share with each other little tricks to making our lives easier with pawn, I'll start:



Actually don't know what this is formally called, but you can use it to skip parts of code when needed (good in a situation where the ending part of code is always the same but you don't need to copy/paste that code in every if/switch statement)



someFunc(params) {



? ? if(params) {



? ? ? ? SendClientMessage(playerid,-1,"Not skipped!");

? ? ? ? return 1;

? ? }



? ? else { goto skipBlock; } //this is how you'd call for the code to skip to `skipBlock`



? ? skipBlock: //this is how you'd create it



? ? SendClientMessage(playerid,-1,"Skipped!");

? ? return 1;

}

0 likes0 replies

    Please sign up or log in to reply