Why's this 'CallRemoteFunction' giving me a mismatch error?
#1

Title, I don't see any issues using it..

PHP код:
CallRemoteFunction(return_callback"i"playerid); 
Full code;

fade.pwn
PHP код:
static PlayerText:playerFadeScreen[MAX_PLAYERS];
SetPlayerToFade(const playerid, const interval, const return_callback[]) {
    
PlayerTextDrawDestroy(playeridplayerFadeScreen[playerid]);
    
playerFadeScreen[playerid] = CreatePlayerTextDraw(playerid,0.0000000.000000"_");
    
PlayerTextDrawBackgroundColor(playeridplayerFadeScreen[playerid], 255);
    
PlayerTextDrawFont(playeridplayerFadeScreen[playerid], 1);
    
PlayerTextDrawLetterSize(playeridplayerFadeScreen[playerid], 0.50000064.000000);
    
PlayerTextDrawColor(playeridplayerFadeScreen[playerid], -1);
    
PlayerTextDrawSetOutline(playeridplayerFadeScreen[playerid], 0);
    
PlayerTextDrawSetProportional(playeridplayerFadeScreen[playerid], 1);
    
PlayerTextDrawSetShadow(playeridplayerFadeScreen[playerid], 1);
    
PlayerTextDrawUseBox(playeridplayerFadeScreen[playerid], 1);
    
PlayerTextDrawBoxColor(playeridplayerFadeScreen[playerid], 0x00000011);
    
PlayerTextDrawTextSize(playeridplayerFadeScreen[playerid], 640.0000000.000000);
    
PlayerTextDrawSetSelectable(playeridplayerFadeScreen[playerid], 0);
    
SetTimerEx("@OnPlayerRefreshScreen"interval/20false"iiis"playeridinterval/200return_callback);
}
forward @OnPlayerRefreshScreen(playeridintervalstagereturn_callback);
@
OnPlayerRefreshScreen(playeridintervalstagereturn_callback) {
    if(
stage 28) {
        if(
stage == 14)
            
CallRemoteFunction(return_callback"i"playerid);
        
SetTimerEx("@OnPlayerRefreshScreen"intervalfalse"iii"playeridintervalstage+1);
        switch(
stage) {
            case 
0PlayerTextDrawBoxColor(playeridplayerFadeScreen[playerid], 0x00000011);
            case 
1PlayerTextDrawBoxColor(playeridplayerFadeScreen[playerid], 0x00000022);
            case 
2PlayerTextDrawBoxColor(playeridplayerFadeScreen[playerid], 0x00000033);
            case 
3PlayerTextDrawBoxColor(playeridplayerFadeScreen[playerid], 0x00000044);
            case 
4PlayerTextDrawBoxColor(playeridplayerFadeScreen[playerid], 0x00000055);
            case 
5PlayerTextDrawBoxColor(playeridplayerFadeScreen[playerid], 0x00000066);
            case 
6PlayerTextDrawBoxColor(playeridplayerFadeScreen[playerid], 0x00000077);
            case 
7PlayerTextDrawBoxColor(playeridplayerFadeScreen[playerid], 0x00000088);
            case 
8PlayerTextDrawBoxColor(playeridplayerFadeScreen[playerid], 0x00000099);
            case 
9PlayerTextDrawBoxColor(playeridplayerFadeScreen[playerid], 0x000000AA);
            case 
10PlayerTextDrawBoxColor(playeridplayerFadeScreen[playerid], 0x000000BB);
            case 
11PlayerTextDrawBoxColor(playeridplayerFadeScreen[playerid], 0x000000CC);
            case 
12PlayerTextDrawBoxColor(playeridplayerFadeScreen[playerid], 0x000000DD);
            case 
13PlayerTextDrawBoxColor(playeridplayerFadeScreen[playerid], 0x000000EE);
            case 
14PlayerTextDrawBoxColor(playeridplayerFadeScreen[playerid], 0x000000FF);
            case 
15PlayerTextDrawBoxColor(playeridplayerFadeScreen[playerid], 0x000000EE);
            case 
16PlayerTextDrawBoxColor(playeridplayerFadeScreen[playerid], 0x000000DD);
            case 
17PlayerTextDrawBoxColor(playeridplayerFadeScreen[playerid], 0x000000CC);
            case 
18PlayerTextDrawBoxColor(playeridplayerFadeScreen[playerid], 0x000000BB);
            case 
19PlayerTextDrawBoxColor(playeridplayerFadeScreen[playerid], 0x000000AA);
            case 
20PlayerTextDrawBoxColor(playeridplayerFadeScreen[playerid], 0x00000099);
            case 
21PlayerTextDrawBoxColor(playeridplayerFadeScreen[playerid], 0x00000088);
            case 
22PlayerTextDrawBoxColor(playeridplayerFadeScreen[playerid], 0x00000077);
            case 
23PlayerTextDrawBoxColor(playeridplayerFadeScreen[playerid], 0x00000066);
            case 
24PlayerTextDrawBoxColor(playeridplayerFadeScreen[playerid], 0x00000055);
            case 
25PlayerTextDrawBoxColor(playeridplayerFadeScreen[playerid], 0x00000044);
            case 
26PlayerTextDrawBoxColor(playeridplayerFadeScreen[playerid], 0x00000033);
            case 
27PlayerTextDrawBoxColor(playeridplayerFadeScreen[playerid], 0x00000022);
            case 
28PlayerTextDrawBoxColor(playeridplayerFadeScreen[playerid], 0x00000011);
        }
    }
    else
        
PlayerTextDrawDestroy(playeridplayerFadeScreen[playerid]);

And this is how I use it:

roleplay.pwn
PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[]) {
    switch(
dialogid) {
        case 
DIALOG_LOGIN: {
            if(
response) {
                if(!
strempty(inputtext)) {
                    static 
password[256];
                    
SHA256_PassHash(inputtext"removed for samp forums"passwordsizeof password);
                    if(!
strcmp(passwordplayerData[playerid][playerPassword], false)) {
                        
playerData[playerid][playerActive] = true;
                        
SpawnPlayer(playerid);
                        
SetPlayerToFade(playerid2000"OnPlayerFinishFade");
                    }
                    else 
ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_PASSWORD"Lexus-Gaming: Roleplay""{A1C1D1}Welcome back,\n please enter your password below to login and play.\n \n"HEXWINE"Your credentials doesn't match up.""Submit""Cancel");
                }
                else 
ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_PASSWORD"Lexus-Gaming: Roleplay""{A1C1D1}Welcome back,\n please enter your password below to login and play.\n \n"HEXWINE"You must enter a password.""Submit""Cancel");
            }
            else {
                
SendClientMessage(playeridCOLOR_WINE"You've been kicked for the following reason..");
                
SendClientMessage(playeridCOLOR_WINE" - You failed to properly log in to your account.");
                
KickPlayer(playerid);
            }
            return 
1;
        }
    }
    return 
0;

Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)