I've basically finished my menu now (Finally!) but because I don't want Everyone using it/giving it out, I was wondering how I can put gamertag checks in it, does anybody know?
Also, if you want it then please let me know.![]()
|
|
|
|
Would you like to get all the new info from
PSX-Scene in your email each day?
Want to learn more about the team keeping you up to date with the latest scene news?
Read about them now! Check out our Developer bios, too! | ||
|
|
I've basically finished my menu now (Finally!) but because I don't want Everyone using it/giving it out, I was wondering how I can put gamertag checks in it, does anybody know?
Also, if you want it then please let me know.![]()
You could post dev only area![]()

Is how all good gaming systems came to beI didn't know there was one![]()
this is a very basic gt and length check, can add a few more things or use extra COMPARE_STRINGS and GET_LENGTH_OF_LITERAL_STRING to throw people off the scent if they try and crack it
Code:void main(void){ THIS_SCRIPT_IS_SAFE_FOR_NETWORK_GAME(); char *name = GET_PLAYER_NAME(GET_PLAYER_ID()) if (!COMPARE_STRING(name, "Your GT Here"))return; length = GET_LENGTH_OF_LITERAL_STRING(name); if (length != 12)return; //just stick your GT length in here while(1){ //stick all the usual stuff in here } }
I see thanks a lot
How about multiple GT's? How would that be?
making it work for multiple gt's makes the length check less effectiveCode:if (!(COMPARE_STRING(name, "Your GT Here") || COMPARE_STRING(name, "2nd GT Here")) )return; if (!(length == 12 || length == 11))return;
EDIT check your pm's for something else for security, didnt want to post it in a public forum and as im not dev i wouldnt be able to post it there
Could I not do seperate checks then? Like this:
Would that work?Code:char *name = GET_PLAYER_NAME(GET_PLAYER_ID()) if (!COMPARE_STRING(name, "1st GT"))return; length = GET_LENGTH_OF_LITERAL_STRING(name); if (length != 11)return; //just stick your GT length in here char *name = GET_PLAYER_NAME(GET_PLAYER_ID()) if (!COMPARE_STRING(name, "2nd GT"))return; length = GET_LENGTH_OF_LITERAL_STRING(name); if (length != 15)return; char *name = GET_PLAYER_NAME(GET_PLAYER_ID()) if (!COMPARE_STRING(name, "3rd GT"))return; length = GET_LENGTH_OF_LITERAL_STRING(name); if (length != 13)return; while(1){
no, because once return is called, the routine stops being executed and returns to what called it, there are other ways around it though, like setting a bool if the gamertag matches
Ah I get it.
Thanks![]()
maybe a few syntax errors, but that should be fine for as many GT's as you wantCode:bool GTcheck(Char *GT, int safelength, char *safeGT){ if (GET_LENGTH_OF_LITERAL_STRING(GT) != safelength)return false; return COMPARE_STRING(GT, safeGT)); } bool GTchecklist(char *GT){ if (GTcheck(GT, 12, "Your GT Here")) return true; if (GTcheck(GT, 11, "2nd GT Here")) return rue; if (GTcheck(GT, 10, "3rd GT etc")) return true; return false; } void main(void){ THIS_SCRIPT_IS_SAFE_FOR_NETWORK_GAME(); if (!GTchecklist(GET_PLAYER_NAME(GET_PLAYER_ID()))) return; while(1){//code here WAIT(0); } }
| « Previous Thread | Next Thread » |