Advertisement
Guest User

Untitled

a guest
Dec 4th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. #pragma semicolon 1
  2. #include <sourcemod>
  3.  
  4. public OnPluginStart()
  5. {
  6. RegConsoleCmd("sm_explode", Explode);
  7. }
  8.  
  9. public Action:Explode(client, args)
  10. {
  11. decl String:Entire_String[32] = "1,2,3,4";
  12. decl String:Pieces_Of_String[32][4];
  13. if (client)
  14. {
  15. ExplodeString(Entire_String, ",", Pieces_Of_String, sizeof(Pieces_Of_String), sizeof(Pieces_Of_String[]), false);
  16. PrintToChat(client, "Color 1: %s", Pieces_Of_String[0]); //
  17. PrintToChat(client, "Color 2: %s", Pieces_Of_String[1]); //
  18. PrintToChat(client, "Color 3: %s", Pieces_Of_String[2]); //
  19. PrintToChat(client, "Color 4: %s", Pieces_Of_String[3]); //
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement